我试图将PDF文件转换为PNG格式。在命令行中它可以完美地工作(我安装了GhostScript 8.64)。但在PHP中,我遇到了问题:
代码:
代码:
$im = new Imagick($pdf_file); // this is where it throws the exception below
输出:
Fatal error: Uncaught exception ‘ImagickException’ with message ‘Postscript delegate failed `23_1235606503.pdf’: No such file or directory @ pdf.c/ReadPDFImage/612′ in get_thumbnail.php:93
Stack trace:
\#0 get_thumbnail.php(93): Imagick->__construct(’…’)
我不确定我在这里做错了什么,但我怀疑这与我的服务器配置有关。 我正在运行: Apache 2.2.11 PHP 5.2.8 ImageMagick 6.4.8-9 GhostScript 8.64