Page 1 of 1

Extracting PDF page as JPEG

Posted: Fri Jul 14, 2006 1:31 pm
by wtf
Greetings,

I need to convert PDF file to JPEG where each page would be a JPEG. I've been up and down http://www.php.net/manual/en/ref.pdf.php but have not found anything related to this. I've also tried using http://www.ghostscript.com/ but the quality results are just awful. I've also tried extracting at higher resolution and resampling the image but haven't seen much of an improovment.



Thanks,

~wtf

Posted: Fri Jul 14, 2006 4:23 pm
by Buddha443556
Have you tried ImageMagick with Ghostscript? There's a postscript example here (the PDF shouldn't be much defferent).

Posted: Sun Jul 16, 2006 10:13 pm
by wtf
In a sense that is exactly what we have done here. Problem is that the quality of the jpg is really crappy. Lots of the aliasing is lost. I've tried extracting the page at the higher resolution and resampling it down to what we need. In a sense it provides document with better quality but not as much. Best result I've achieved so far is by extracting the page as .png. Quality turns to be much better however that adds huge white space on top of the image and I have no clue where does it come from. That would not be a huge issue however, how do I know that size of the white space will stay consistent for all future documents. I'm not sure what we'll do from here but we'll eventually have to settle for something.

I appreciate your feedback.



Thanks,

~wtf