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?
I doubt your quoted 2 lines are really inside the PS file as quoted... Aren't they preceeded by %
comment characters?
If they weren't preceeded by such characters, no PS interpreter would work, because they are no known PostScript operators.
If they are preceeded by such characters, the PS interpreter would simply ignore them, because... they are comments only! :-)
If you want to convert this PS file to PDF, it is better to run Ghostscript directly (ps2pdf
is only a thin shell script wrapper around a Ghostscript command anyway):
gs -o myfile.pdf \
-sDEVICE=pdfwrite \
-g5775x6207 \
-dPDFFitPage \
myfile.ps
Explanation:
-g...
gives the medium size in pixels.595x842pt
(PostScript points).595x842pt == 5950x8420px
.8.02x8.62Inches ≈≈ 5775x6207px
.