Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php PDF功能无法使用Laragon与imagick一起使用_Php_Imagemagick_Ghostscript_Imagick_Laragon - Fatal编程技术网

Php PDF功能无法使用Laragon与imagick一起使用

Php PDF功能无法使用Laragon与imagick一起使用,php,imagemagick,ghostscript,imagick,laragon,Php,Imagemagick,Ghostscript,Imagick,Laragon,我目前正在尝试使用Imagick将PDF页面转换为图像,但是,我遇到以下错误: PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/794 我相信这是因为ImageMagick没有检测到我的GhostScript安装 我知道Imagick工作得很好,因为我可以用它处理其他图像文件 我还知道ImageMagick和GhostScript正在我的系统(windows)上

我目前正在尝试使用Imagick将PDF页面转换为图像,但是,我遇到以下错误:

PDFDelegateFailed `The system cannot find the file specified. ' @ error/pdf.c/ReadPDFImage/794
我相信这是因为ImageMagick没有检测到我的GhostScript安装

我知道Imagick工作得很好,因为我可以用它处理其他图像文件

我还知道ImageMagick和GhostScript正在我的系统(windows)上工作,因为当我通过windows CMD运行ImageMagick时,我能够将pdf页面转换为图像。只有当我尝试通过Imagick使用ImageMagick时,才会出现错误

为了让Imagick在Laragon中使用PHP,我遵循了以下步骤。本指南的一部分是将ImageMagick DLL从复制到Laragon使用的根PHP文件夹中

我相信PHP使用的是我放在PHP文件夹中的ImageMagick版本,而不是我系统使用的ImageMagick工作版本,它安装在
C:\Program Files\ImageMagick-7.0.10-Q16-HDRI
中,而不是
C:\laragon\bin\PHP\PHP-7.4.10-Win32-vc15-x64

我在路径环境变量中设置了正确的ImageMagick和GhostScript路径,但运气不好


是否可以将Imagick设置为使用不同的ImageMagick安装,或者至少检测我的GhostScript安装?

解决了这个问题。使用官网()中的安装程序安装ImageMagick,然后将所有文件移动到PHP安装文件夹中