Re: convert PDF to Image with Imagick PHP Module

From: Date: Fri, 12 Oct 2007 16:39:36 +0000
Subject: Re: convert PDF to Image with Imagick PHP Module
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4894@lists.php.net to get a copy of this message
You either don't have ghostscript installed or its not installed properly. The code you give works fine for me. Scott Robert Hassing wrote: > Hi > > Is there a way to convert an PDF to an Image using the Imagick PHP Module > (2.0.0) > > i tried it but an error comes up: > > the code: > $uploadfile="some.pdf"; > $convertfile=some.jpg"; > > $im = new Imagick(); > $im->readImage( "./".$uploadfile."" ); > $im->writeImage( "./".$convertfile."" ); > $im->destroy(); > > the error: > > Fatal error: Uncaught exception 'ImagickException' with message 'Postscript > delegate failed `./some.pdf'' in > /home/orgidee.org/www/admin/content/cms_imke_nieuws.php:17 > Stack trace: #0 /home/orgidee.org/www/admin/content/cms_imke_nieuws.php(17): > Imagick->readimage('/home/orgidee.o...') #1 > /home/orgidee.org/www/admin/content/cms_imke.php(34): > include('/home/orgidee.o...') #2 /home/orgidee.org/www/admin/index.php(150): > include('/home/orgidee.o...') #3 {main} thrown in > /home/orgidee.org/www/admin/content/cms_imke_nieuws.php on line 17 > > Hope anyone can help me out here > > Robert

« previous php.pecl.dev (#4894) next »