Postscript delegate failed
Posted: 2014-01-24T02:49:27-07:00
Hi.
I tried to convert a pdf to a jpg and got:
Uncaught exception 'ImagickException' with message 'Postscript delegate failed `test.pdf': No such file or directory @ pdf.c/ReadPDFImage/634'
This occurs only for one particular pdf which however seems to be valid since my pdf viewer and browser both were able to open it.
GhostScript is installed.
This is the code I tried:
I tried to convert a pdf to a jpg and got:
Uncaught exception 'ImagickException' with message 'Postscript delegate failed `test.pdf': No such file or directory @ pdf.c/ReadPDFImage/634'
This occurs only for one particular pdf which however seems to be valid since my pdf viewer and browser both were able to open it.
GhostScript is installed.
This is the code I tried:
Code: Select all
ini_set('display_errors', 1);
error_reporting(E_ALL);
$im = new imagick('test.pdf[0]');
$im->setImageFormat('jpg');
$im->trimImage(0);
$im->writeImage('test.jpg');