我正在尝试将 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