Postscript delegate failed error 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
hessodreamy
Posts: 1
Joined: 2015-07-16T03:05:01-07:00
Authentication code: 1151

Postscript delegate failed error with PHP

Post by hessodreamy »

When I try to use php/imagick to open a pdf file, I get the following error:

Code: Select all

-dname= must be followed by a valid token

Fatal error: Uncaught exception 'ImagickException' with message 'Postscript delegate failed `label.pdf'' in Command line code:1
Stack trace:
#0 Command line code(1): Imagick->__construct('label.pdf')
#1 {main}
  thrown in Command line code on line 1
This appears to be the known issue of conflicting with php's gd library, as this works:

Code: Select all

$ php -n  -d extension=imagick.so -r 'var_dump($im = new Imagick("../foo.pdf"));'
But this doesn't:

Code: Select all

$ php -n  -d extension=gd.so -d extension=imagick.so -r 'var_dump($im = new Imagick("../foo.pdf"));
I didn't put this in bugs as I think it's a known issue I'm using an old version (ImageMagick 6.2.8, imagick module version 3.1.2, PHP 5.3.29, Ghostscript 8.70). I've read of an issue with version 6.8.9-7, but not mine.

Updating to a different version might be my solution, but any suggestion as to which version I should use?

Thanks
Post Reply