How do I set the physical size of PDF pages using Ghostscript?
I want to convert a bunch of .eps images to one PDF using Ghostscript.
But when I look at the PDF file in the PDF viewer and set the view to 100%, the physical file size is huge!
I would like to force gs to create a PDF in letter format, but everything I tried failed. Here's the command I'm using:
gs -dBATCH -dNOPAUSE -dEPSFitPage -dEPSCrop \
-q -sDEVICE=pdfwrite -sOutputFile=out.pdf \
file1.eps file2.eps
All my attempts with -sPAPERSIZE=legal
and -dDEVICEWIDTHPOINTS=w -dDEVICEHEIGHTPOINTS=h
had no effect.
source to share
-dEPSFitPage
and -dEPSCrop
are mutually exclusive. Try to get rid of -dEPSCrop
and return -sPAPERSIZE=legal
. If that doesn't work, it might be because the .eps file is being redirected to the media, so try adding -dFIXEDMEDIA
.
By the way, this answer knocks out: Applies to page size in ghostscript (with possibly corrupted input)
source to share