Prevent GIF animation when converting from multiple page PDF
Posted: 2008-10-02T05:51:04-07:00
Hi,
I have been trying to convert a PDF to GIF as my experience is that GIF provides the smallest file size.
But the PDF contains multiple pages, that needs to be converted to seperate GIF files.
Situation is that we recieve a PDF from a supplier, where the content needs to be uploaded to an internal web page, but in an image format, that is small in size and download.
I have tried to convert to JPG at 75, even at a 50 compression level (-quality) but the ending image size is too big (about 270kb) and PNG results in a 240Kb file size, where the GIF usually ends up around 100kb at most.
I believe I can get a lower file size by converting to a 256 color depth, but have been unable to locate the appropriate switch for this (-colorspace or -depth did not work, or I am doing something wrong)
Command line:
convert -trim -density 150x150 -units pixelsperinch input.PDF output.gif
Ending result should be multiple .GIF output files just like when converting to JPG or PNG.
/Robert
PS: I tried several searches, but can only find results concerning animation creations, now how to -split into several .GIF files.
I have been trying to convert a PDF to GIF as my experience is that GIF provides the smallest file size.
But the PDF contains multiple pages, that needs to be converted to seperate GIF files.
Situation is that we recieve a PDF from a supplier, where the content needs to be uploaded to an internal web page, but in an image format, that is small in size and download.
I have tried to convert to JPG at 75, even at a 50 compression level (-quality) but the ending image size is too big (about 270kb) and PNG results in a 240Kb file size, where the GIF usually ends up around 100kb at most.
I believe I can get a lower file size by converting to a 256 color depth, but have been unable to locate the appropriate switch for this (-colorspace or -depth did not work, or I am doing something wrong)
Command line:
convert -trim -density 150x150 -units pixelsperinch input.PDF output.gif
Ending result should be multiple .GIF output files just like when converting to JPG or PNG.
/Robert
PS: I tried several searches, but can only find results concerning animation creations, now how to -split into several .GIF files.