Search code examples
pdfconverterspostscript

How to convert ps to same-looking pdf file?


I have a ps file consisting of several pages, with the following entry for the bounding box:

%%PageBoundingBox: 36 36 7164 2124

When viewing this file with okular it looks ok. After the conversion to a pdf as follows

ps2pdf graph.ps

a pdf is created, but each page shows only a magnification for each of the ps file. For the conversion I also tried options like

-sPAPERSIZE=letter 
-dEPSCrop

with no visible effect. My question: How can I convert my ps file into a pdf file in such a way, that when viewed with okular the result looks identical?


Solution

  • It seems the desired width and hight must be specified for the conversion, in this case the command would be

    ps2pdf -dDEVICEWIDTHPOINTS=7128  -dDEVICEHEIGHTPOINTS=2088  isearch.ps
    

    as 7128 is the width and 2088 is the height of the bounding box for the given example.