Problem reading a 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
MarcinG

Problem reading a PDF

Post by MarcinG »

Hi!
I'm having a problem reading PDF file with Imagick:

Code: Select all

		$im = new Imagick();
		$im->readImage(APP_PATH .'/public/pdfs/template.pdf');
I get to following message:
Fatal error: Uncaught exception 'ImagickException' with message 'Unable to read the file: ***pdfs/template.pdf' in...
It doesn't happen when Im trying to read jpegs or tiffs.
The file is there, PHP can read it easily.

My OS is Vista 32, I am using PHP 5.2.5 with IM 6.3.9-Q16 ,php_imagick.dll from snaps.php.net, ghostscript 8.61

I am having exactly the same problem with MagickWand.

Please help.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Problem reading a PDF

Post by mkoppanen »

Is GhostScript installed and is it in the $PATH?
Mikko Koppanen
My blog: http://valokuva.org
MarcinG

Re: Problem reading a PDF

Post by MarcinG »

It is.
Post Reply