pdf to full page images

fredex fredex at fcshome.stoneham.ma.us
Mon Nov 27 00:57:09 UTC 2006

On Sun, Nov 26, 2006 at 12:35:57PM -0600, Frank Cox wrote:
> On Sun, 26 Nov 2006 12:02:35 +0000
> Chris Jones <jonesc at hep.phy.cam.ac.uk> wrote:
> > Does anyone know if there is a tool that will convert a pdf file to multiple 
> > image files (png, gif whatever..), one for each page ?
> gimp

You can take a copy of pdf2ps (just a shellscript) and modify the it to 
look like this:

outfile=`basename "$1" \.pdf`-%02d.tif
exec gs $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -r300x300 -sDEVICE=tiffg3 "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1" 

and you'll get one .tif file for each page of the pdf. Using the
"-%02d" will give one file per page and number them 01, 02, ..., 99.

From there you can convert to whatever you want with 'convert'.

Or, you can use one of the other GS output options to produce some
other output format, such as png "-sDEVICE=png16m" or others. See
"gs --help" for a list of supported formats.

---- Fred Smith -- fredex at fcshome.stoneham.ma.us -----------------------------
                      The eyes of the Lord are everywhere, 
                    keeping watch on the wicked and the good.
----------------------------- Proverbs 15:3 (niv) -----------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20061126/b2f61583/attachment-0002.bin 

More information about the users mailing list