我想从 PHP 中的 pdf 页面生成图像。我正在使用 imagick php 扩展来实现这一点,但是当我尝试通过 imagick 读取 pdf 文件时出现以下错误
Fatal error: Uncaught ImagickException: PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/801
我的代码是
$imagick = new Imagick();
$imagick->readImage(dirname(__FILE__). '/test.pdf');
来自 phpinfo() 的我的服务器详细信息
PHP: Version 7.0.13
System: Windows NT LALMANI-PC 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586, Architecture: x86
imagick module version: 3.4.3
Imagick using ImageMagick library version: ImageMagick 6.9.3-7 Q16 x86
我还在我的系统中安装了 ImageMagick-6.9.9-27 和 Ghostscript 9.22。
请让我知道这里有什么问题。提前致谢。
最佳答案
我在 64 位的 Ghostscript 9.22 安装中遇到了问题,我卸载了它并安装了 Ghostscript 9.22 32 位。问题已修复。
谢谢你的帮助。
关于PHP:未捕获的 ImagickException:PDFDelegateFailed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47969371/