[reportlab-users] Generate a Jpeg image from a PDF File done by reportlab

Robin Becker robin at reportlab.com
Wed Dec 2 11:49:25 EST 2009


Dani Reguera wrote:

> Hi everybody,

>

> I have a problem with a pdf file generated with reportlab, maybe anyone

> could help me. I have generated a file in reportlab, and now I want to make

> a thumbnail image, the format doesn't matter (png or jpeg) and I'm trying

> with ghostscript (GS) and ImageMagick, but the problem is that GS tells me

> that it's and error. Seems that the pdf generated by reportlab is

> corrupted... could be that the pdf format is PDF-1.3?

>

> Is in reportlab a way to generate a jpg image or export apdf file to a jpg

> image?

>

> Any suggestion or help will be appreciated.

>

> Dani

........
we are using ghost script to make images out of pdfs and don't see these errors.
We rely on acrobat reader to tell us if the document is corrupt. If you have a
small script that creates the error please post it here.

The sort of command that we end up running looks like this

C:\Program Files\gs\gs8.60\bin\gswin32c.exe -q -dSAFER -dNOPAUSE -dBATCH
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dJPEGQ=85
-sOutputFile=C:\Tmp\talpha2-page%04d.jpg -sDEVICE=jpeg -r9x9 -f talpha2.pdf


--
Robin Becker


More information about the reportlab-users mailing list