convert PDF to Image with Imagick PHP Module
| From: | Robert Hassing | Date: | Fri, 12 Oct 2007 15:36:11 +0000 |
| Subject: | convert PDF to Image with Imagick PHP Module | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-4893@lists.php.net to get a copy of this message | ||
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