The customer asks: In the usage of Ghostscript the option PDFFitPage is explained as follows: -dPDFFitPage Rather than selecting a PageSize given by the PDF MediaBox or CropBox (see -dUseCropBox), the PDF file will be scaled to fit the current device page size (usually the default page size). This is useful to avoid clipping information on a PDF document when sending to a printer that may have unprintable areas at the edge of the media larger than allowed for in the document. This is also useful for creating fixed size images of PDF files that may have a variety of page sizes, for example thumbnail images. .......... Is possible to add some more functionality, e.g. to create centered output. In the AcrobateReader it is possible to select automatic rotation and centered output when printing a document.
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.