I\'m trying to use ghostscript to convert a .ps file to a series of .png files, largely because I don\'t have a tolerable ps viewer.
This is the command I\'ve used:<
-dEPSCrop
and -dEPSFitPage
are mutually exclusive:
%%BoundingBox
specified in the PS file's internal comments to fit the current media. You can't really use both at the same time.
The file can't be an EPS file anyway, because you can't have multiple pages in an EPS file. So actually neither switch will have any effect (as you've discovered).
Either the PostScript requests a media size using setpage
or setpagedevice
, or it just uses whatever the currently set media is. My guess is that its just using the current media. Try setting -sPAPERSIZE=a4
and -sPAPERSIZE=letter
.
If that works then the program does not request a media size. If it has no effect, then set -dFIXEDMEDIA
in addition which will ignore subsequent requests to change the media size.
That should allow you to specify the correct media size, if you don't know what the media size should be then you can use the Ghostscript -sDEVICE=bbox
device to find out.
Lastly, Ghostscript has a rudimentary display device which you can use to view the rendered output without first going to a PNG.