PHP:未捕获的ImagickException:PDFDelegateFailed [英] PHP: Uncaught ImagickException: PDFDelegateFailed

查看:349
本文介绍了PHP:未捕获的ImagickException:PDFDelegateFailed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从PHP的pdf页面生成图像.我正在使用imagick php扩展来实现此目的,但是当我试图通过imagick读取pdf文件时出现以下错误

I want to generate images from pdf pages in PHP. I am using imagick php extention to achieve this but I am getting error below when i am tring to read pdf file by imagick

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()中的我的服务器"详细信息

My Server details from 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.

I also installed ImageMagick-6.9.9-27 and Ghostscript 9.22 in my system.

请让我知道这里出了什么问题.预先感谢.

Please let me know what is wrong here. Thanks in advance.

推荐答案

我在64位的Ghostscript 9.22安装中遇到问题,我卸载了该软件并安装了32位的Ghostscript 9.22.已解决问题.

I got issue in Ghostscript 9.22 installation that was 64-bit, I uninstalled that and installed Ghostscript 9.22 32-bit. Issue Fixed.

感谢您的帮助.

这篇关于PHP:未捕获的ImagickException:PDFDelegateFailed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆