ps2pdf: preserve page size

BowPark picture BowPark · May 8, 2015 · Viewed 10.7k times · Source

I have myfile.ps with a vector image included. But when I run

ps2pdf myfile.ps

it seems that the output page size is A4: the vector image is too large and become cut away, so about one inch is lost.

The following pseudo-header is printed in the output PDF file, in addition to the original vector image:

PLOT SIZE:8.02x8.62Inches
Magnification:7354.21X

Is there any option or any way to convert the PS file to a PDF preserving the original paper size?

Answer

Raman picture Raman · Jul 28, 2016

If the input postscript has an EPS BoundingBox, this should preserve the page size:

ps2pdf -dEPSCrop <input.ps> <output.pdf>