Page 1 of 1

convert multi page ps to png

Posted: 2013-02-11T07:40:51-07:00
by markp
Hello,

Here are my system specs:
Manufacture and model - Dell PowerEdge 2950
CPU - dual Intel Xeon x5450 3.0GHz (8 CPU threads)
RAM - 16GB
disks - 1x80GB and 3x1TB
OS - Redhat Enterprise Linux 5.8 x86_64
Running ImageMajick 6.2.6

I'm having a problem converting a multi page postscript file to png formats. The following command is issued under linux using
convert myfile.ps myfile.png<return>

Command converts only 15 of the 30 pages it finds in myfile.ps.

I've tried:
Using gs to split my ps file into single page files which did not work
prompt>gs -sOutputFile=myfile%d.ps -sDEVICE=png16
prompt>gs -sOutputFile=plotchi%d.ps plotchi.ps

converting to pdf using ps2pdf which worked but only put 15 images of the 30 into the pdf file (so same problem different program)
prompt>ps2pdf plotchi.ps plotchi.pdf

So there's some kind of inherent limitation in gs (which as I understand it underlies imageMagick programs.

So to reiterate. I'd like to convert my ps file into png format. The command I used is only producing the first 15 pages of my ps file. Any ideas?

Thank you for your consideration,
markp

Re: convert multi page ps to png

Posted: 2013-02-11T08:27:24-07:00
by snibgo
Have you tried something like:

Code: Select all

convert myfile.ps[0-14] myfile.png
convert myfile.ps[15] myfile.png
convert myfile.ps[16-29] myfile.png
What does ...

Code: Select all

identify myfile.ps
... say? With and without verbose?

Edit to add: gosh, that's an ancient version of IM! Perhaps your Ghostscript is also antiquated?

Re: convert multi page ps to png

Posted: 2013-02-11T09:25:13-07:00
by markp
Thank you very much, that worked well. However, under bash you have to single quote the parameters with [#-#], otherwise the shell interprets them it as a file wildcard.

Thank you for your consideration,
markp