problem reading PDF

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
ivobrabec

problem reading PDF

Post by ivobrabec »

Hi,
i have 2.0.1 installed on our server and the following error is produced when making :
$handle=new Imagick();
$handle->readImage("test.pdf");

Fatal error: Uncaught exception 'ImagickException' with message 'Postscript delegate failed `/httpd/html/mydomain/www/test.pdf': No such file or directory' in /httpd/html/mydomain/www/test.php:5 Stack trace: #0 /httpd/html/mydomain/www/test.php(5): Imagick->readimage('test.pdf') #1 {main} thrown in /httpd/html/mydomain/www/ivo.php on line 5

The PDF is accessible, in the same directory, i can be access with fopen()...
Anybody has any idea what is the problem? THe pdf is attached, i tried sevral pdf....
Thanks a lot
Ivo

PF sorry i put this post by accident to the bugs section also...
Attachments
test.pdf.zip
test.pdf
(212.8 KiB) Downloaded 1059 times
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: problem reading PDF

Post by mkoppanen »

ivobrabec wrote: Fatal error: Uncaught exception 'ImagickException' with message 'Postscript delegate failed `/httpd/html/mydomain/www/test.pdf': No such file or directory' in /httpd/html/mydomain/www/test.php:5 Stack trace: #0 /httpd/html/mydomain/www/test.php(5): Imagick->readimage('test.pdf') #1 {main} thrown in /httpd/html/mydomain/www/ivo.php on line 5

Let's start it simple: log into your server and try to execute "gs" command. Does it give you command not found? If yes, install ghostscript.
Mikko Koppanen
My blog: http://valokuva.org
ivobrabec

Re: problem reading PDF

Post by ivobrabec »

i asked the server admin to install ghostscript, so far without any modules...the problem with pdf still persists....what should be installed next?

Thanks much for your help
Ivo
ivobrabec

Re: problem reading PDF

Post by ivobrabec »

Hi,
finaly we got it...it was due to the ghostscript was not availabe to the script as the server uses chroot..
Thanks for your help
Ivo
Post Reply