【问题标题】:ImageMagick Errors: Convert PDF to ImagesImageMagick 错误:将 PDF 转换为图像
【发布时间】:2011-09-29 06:42:44
【问题描述】:

当我使用带有以下参数的 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.

请帮帮我~

【问题讨论】:

    标签: image pdf imagemagick


    【解决方案1】:

    ImageMagick 无法自行处理 PostScript 和 PDF 文件。为此,它使用名为 Ghostscript 的第三方软件作为“代理”。

    您的 Windows 系统 Ghostscript 是否安装正确?还是根本没有安装?

    尝试从here下载并安装最新版本。

    如果问题是由缺少 Ghostscript 安装引起的,您可能会收到不同的错误消息。但你的错误是:

    D:\RealDocs.pptx.pdf': No such file or directory 
    @ pdf.c/ReadPDFImage/634.convert.exe: missing an image filename `d:\hello.jpg' 
    

    这可能意味着您运行此命令的用户帐户没有写入D: 驱动器根目录的权限。

    要对此进行测试,您可以在 cmd.exe 窗口中以稍微修改的方式运行转换命令:

     "C:\Program Files\ImageMagick-6.5.8-Q16\convert.exe" ^
          "D:\RealDocs.pptx.pdf" ^
          "%userprofile%\hello.jpg"
    

    (在 Windows XP 上,%userprofile% 通常指向 c:\documents and settings\<your username>\...)

    【讨论】:

    • 你能提供任何PHP示例$obj = new Imagick();$readImg = $obj->readImage($src."[0]");吗?
    • 如果您从他们的网站下载 Ghostscript 时遇到问题。 SourceForge 上有一些安装程序的镜像。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-22
    • 1970-01-01
    • 1970-01-01
    • 2012-03-31
    • 2016-05-14
    • 2013-06-03
    • 1970-01-01
    相关资源
    最近更新 更多