Summary: | Enhancement request: create centered output when reading PDF | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | PDF Interpreter | Assignee: | Ken Sharp <ken.sharp> |
Status: | NOTIFIED FIXED | ||
Severity: | enhancement | CC: | htl10, sags5495 |
Priority: | P2 | ||
Version: | master | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | 870 | Word Size: | --- |
Description
Marcos H. Woehrmann
2008-09-29 09:38:16 UTC
pdftops (part of xpdf) also by default do shrink-to-fit and centering pages smaller than output device size. This is actually a ps2write enhancement request, not the PDF interperter. Re-assigning to me to deal with. As I understand it, it is a PDF interpreter issue, and the changed is to be done in pdf_main.ps::pdf_PDF2PS_matrix. Currently, the transformation computed there places the PDF page in the bottom-left corner of the output page’s imageable area (= page less hw margins). IIRC, it already rotates the page, if needed, to get the best fit. No, its pswrite, just like the FitPages, SetPageSize and RotatePages switches. Doing it here means that the change will work for any input with pswrite as the target device. The centering is done by determining the current page size of the device, the requested page size, and modifying the translation of the CTM so that the page is centered. As it happens I'm halfway through it at the moment. New feature added with revision 9450. Setting -dCenterPages will center the output on the media. If the output is larger than the media then it will be truncated, but still centered. Compatible with RotatePages, but not with SetPageSize or FitPages. Patch here: http://ghostscript.com/pipermail/gs-cvs/2009-February/009027.html Updated documentation in ps2ps2.htm Changing customer bugs that have been resolved more than a year ago to closed. |