I'm using ubuntu 10.10 and I have ghost script installed. What I need to do is to extract one page from my PDF and then convert that page to a jpg. The aim is to create a PDF previewer....
Here's some settings I found that apply to a windows version of ghostscript to convert the entire thing into a jpg. It doesn't let me isolate one page and that's really what i need.
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=30 ^
-r72x72 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
/path/to/pdffile.pdf
I then need to write this into my PHP library so that I can just run a function like $img_src = pdf::preview('test.pdf', $page=1);
Does anyone have any idea about this?
Thanks
ESP Ghostscript 815.02 (2006-04-19) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details.