To do this you need to define a /EndPage procedure which sets the desired CropBox using a pdfmark, and send that before you process the PDF file. This isn't entirely non-trivial in your case each page has a CropBox (its not a single default for the entire document), so you need to override the CropBox on each page. If you don't want the CropBox to be preserved, you will have to construct a new CropBox Page or PAGES pdfmark and send it as PostScript. The reason the height is given differently is because the new MediaBox is inside the original CropBox, so it is the intersection of the two boxes being given. The MediaBox is in fact 612x792, ie exactly 8.5x11, which is what you wanted. The output from pdfinfo is telling you the size of the PDF file, taking the CropBox into account. Your problem is that the original PDF file contains a CropBox, which is retained by the Ghostscript pdfwrite device. I do not mind if it involves adding a little whitespace on either side.ĭouble conversion isn't a good plan, you potentially introduce problems at every step, especially since PostScript does not support the graphics model of PDF (in particular it does not support transparency) How can I force the PDF to be exactly 8.5 x 11? I have tried the solutions here and here but neither achieves what I require. It is effectively 8.3 x 11, not 8.5 x 11. Notice that the output has the correct height but not the correct width. All you need to change is the -o outputfile.pdf (to the path of your outputfile) and change sourcethefile.pdf to the pdf that you want to resize. Here is pdfinfo on the original: Producer: Creo Normalizer JTP dPDFFitPage -q -sDEVICE=pdfwrite -sOutputFile=out.pdf \ gs -dFIXEDMEDIA -dBATCH -dNOPAUSE -sPAPERSIZE=letter \ ![]() ![]() I am trying to convert it to standard letter size (8.5 x 11) using the following command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |