Using PDF with ImageMagick (Not MagickWand) with PHP

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
salomsalom

Using PDF with ImageMagick (Not MagickWand) with PHP

Post by salomsalom »

Hi,

I have installed PHP 5.2.3 for windows with imagemagick extension activated (not MagickWand) I have been writing some code to test some features I don´t have any problem working with JPEG files, but when I try to use ImageMagick to read a PDF files I always get the following error:
Fatal error: Uncaught exception 'ImagickException' with message 'Undefined exception.' in C:\web-php\test.php:12 Stack trace: #0 C:\web-php\test.php(12): Imagick->__construct('test.pdf') #1 {main} thrown in C:\web-php\test.php on line 12
The simple line that makes the wrong is:

Code: Select all

$handle = new Imagick('test.pdf');

I supposed that maybe it needs Ghostscript to read/write PDF files but after install it I still receive the same code error.


Can anybody help me??

P.D.: Yes, I know that my english it´s not as good as I would like, please excuse me for that.
Post Reply