我正在尝试将PDF文件转换为PNG.它在命令行中运行良好(我安装了GhostScript 8.64).但是从PHP我遇到了一个问题:
码:
$im = new Imagick($pdf_file); // this is where it throws the exception below
Run Code Online (Sandbox Code Playgroud)
输出:
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(’…’)
Run Code Online (Sandbox Code Playgroud)
等等
我不确定我在这里做错了什么,但我怀疑它与某处的服务器配置有关.我正在运行:Apache 2.2.11 PHP 5.2.8 ImageMagick 6.4.8-9 GhostScript 8.64