Try adding -dUseTrimBox to your command line. Ghostscript uses the MediaBox by default, if you want it to use a different *Box then you haver to tell it so. However it has a TrimBox which is doing the arithmetic that works out is 8.524x11.018 inches.Ĭlearly Acrobat (or whatever you are using to get the size) is using the TrimBox, not the MediaBox. Your second file has a MediaBox of 684x864 which is 9.5x12 inches. Either you need to tell that process to use the MediaBox and ignore the CropBox, or have it centre the CropBox on the media when the CropBox is not the same as the media. We illustrate this in PostScript Page (Letter Size) by labeling a few.
![ghostscript ps to pdf lettersize ghostscript ps to pdf lettersize](https://ifac.papercept.net/conferences/support/images/gsview_2.jpg)
So really its up to your printing process. Since PDF is so closely related to PostScript, most drawings in PostScript can. If you remove the CropBox (using a binary editor) and open the file in Acrobat you will see that the white space is evenly distributed left and right of the page.
![ghostscript ps to pdf lettersize ghostscript ps to pdf lettersize](https://shop.nanisnotebook.com/wp-content/uploads/2022/09/letter-mockup-title.jpg)
Its the result of scaling A4 down to Letter and centring that scaled down area on the Letter media.
Some further comments by Till Kamppeter: 'Sending the PostScript file directly to a native PostScript printer, for example using the command nc -w1These, along with your previous question, are all related to the myriad different Boxes available in a PDF file, and the various ways that a PDF processor will deal with the available Boxes.įor your first file the output of pdfwrite has a MediaBox of 612x792 but a CropBox of which is (of course) not Letter. PS file is too big to attach here, so you will have to generate it using Evince. 0.02" is within our printing tolerances so we can let it go, but a) I'd rather have just one process b) maybe the issue isn't the small scaling adjustments and maybe it will be a problem for other files. For this one I get an output file that is 549.127 x 709.8 pts and I don't get it at all. How can I modify my command (or run a second command) to do this? It's scaled accurately, but we need whitespace either on both sides or on the right. The command scales it to a height of 792 and the width is scaled to 559.667.
![ghostscript ps to pdf lettersize ghostscript ps to pdf lettersize](https://shop.nanisnotebook.com/wp-content/uploads/2022/09/purp-mock2.jpg)
One needs extra whitespace the other just needs a very small rescaling but it gets a wildly different output. We need to have it generate output pages that are US Letter. Inside TeXnicCenter: Menu Build > Define Output Profiles Select the. Gs -sDEVICE=pdfwrite -sOutputFile= $outFile -dBATCH -dNOPAUSE -q -dDEVICEHEIGHTPOINTS=792 -dDEVICEWIDTHPOINTS=612 -dPDFFitPage -dFIXEDMEDIA $inFile This is for the default LaTeX > PS > PDF build profile. I recently asked this question about changing paper size and have a command that scales properly most of time: