ImageMagick 错误:将 PDF 转换为图像
当我运行以下命令使用具有以下参数的 ImageMagic Convert util 将 PDF 转换为图像时:
C:\Windows\system32>"C:\Program Files\ImageMagick-6.5.8-Q16\convert.exe" "D:\RealDocs.pptx.pdf" "d:\hello.jpg"
我收到以下错误:
convert.exe: `%s': %s "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/Users/Nupitch/AppData/Local/Temp/magick-xwOF7jbV" "-fC:/Users/Nupitch/AppData/Local/Temp/magick-BescEsek" "-fC:/Users/Nupitch/AppData/Local/Temp/magick-XfLll9WM" @ utility.c/SystemCommand/1964.convert.exe: Postscript delegate failed `D:\RealDocs.pptx.pdf': No such file ordirectory @ pdf.c/ReadPDFImage/634.convert.exe: missing an image filename `d:\hello.jpg' @ convert.c/ConvertImageCommand/2838.
请帮助我 ~
When I run the following command to convert a PDF to Image using ImageMagic Convert util with the following parameters :
C:\Windows\system32>"C:\Program Files\ImageMagick-6.5.8-Q16\convert.exe" "D:\RealDocs.pptx.pdf" "d:\hello.jpg"
I get the following error :
convert.exe: `%s': %s "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/Users/Nupitch/AppData/Local/Temp/magick-xwOF7jbV" "-fC:/Users/Nupitch/AppData/Local/Temp/magick-BescEsek" "-fC:/Users/Nupitch/AppData/Local/Temp/magick-XfLll9WM" @ utility.c/SystemCommand/1964.convert.exe: Postscript delegate failed `D:\RealDocs.pptx.pdf': No such file ordirectory @ pdf.c/ReadPDFImage/634.convert.exe: missing an image filename `d:\hello.jpg' @ convert.c/ConvertImageCommand/2838.
please help me ~
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ImageMagick 本身无法处理 PostScript 和 PDF 文件。为此,它使用名为Ghostscript的第三方软件作为“代理”。
您的Windows系统Ghostscript安装正确了吗?或者根本就没有安装?
尝试从此处下载并安装最新版本。
如果问题是由缺少 Ghostscript 安装引起的,您可能会收到不同的错误消息。但您的错误是:
这可能意味着您运行此命令的用户帐户没有写入
D:
驱动器根目录的权限。要测试这一点,您可以以稍微修改的方式在 cmd.exe 窗口中运行转换命令:(
在 Windows XP 上,
%userprofile%
通常指向c:\documents and settings\ <您的用户名>\
...)ImageMagick cannot handle PostScript and PDF files itself and by its own. For this it uses a third party software called Ghostscript as a 'delegate'.
Has your Windows system Ghostscript installed properly? Or is not installed at all?
Try to download and install the latest version from here.
Probably you'd get a different error message if the problem is caused by a missing Ghostscript installation. But your error is:
This could mean that the user account you run this command under does not have permission to write to the root of the
D:
drive.To test this, you could run the conversion command in a cmd.exe window in a slightly modified way:
(On Windows XP,
%userprofile%
usually points toc:\documents and settings\<your username>\
...)