Page 1 of 1

PDF Image Preview

Posted: Thu Jan 31, 2008 3:33 am
by tommy1987
Hello,

I need to create the first page of a PDF document into an image to display on my website. What is the best way to this. I did look into the ImageMagick library since this is capable, but could not get it working. I tried the following:

Code: Select all

exec('convert “document.pdf[0]” -colorspace RGB -geometry 200 “document.png”');
 
However this gave the following error:

Code: Select all

PHP Warning: exec(): Unable to fork [convert “document.pdf[0]” -colorspace RGB -geometry 200 “document.png”]

Re: PDF Image Preview

Posted: Thu Mar 06, 2008 1:57 pm
by Zoxive
:google:

http://www.google.com/search?q=php+Unable+to+fork
Cause
The most likely cause is insufficient permissions to execute system calls in the web server environment.