【问题标题】:Error on convert pdf to png using ImageMagick使用 ImageMagick 将 pdf 转换为 png 时出错
【发布时间】:2016-08-21 14:26:57
【问题描述】:

使用以下命令将 pdf 转换为 png 时出错: 转换-密度300-深度8-质量85 655382767_1460008284.pdf[0-9] 655382767_1460008284.png

操作系统:Redhat 64 位 6.7 ImageMagick:版本 6.7.2-7 2015-02-27 Q16 Ghostscript : GPL Ghostscript 8.70 (2009-07-31)

它给出以下错误:

+++++++++++++++++++++++++++++++++
Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 4 1 8 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1745 0 9 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1157/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:27/40(L)--
Current allocation mode is local
Last OS error: 28
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
convert: Postscript delegate failed 655382767_1460008284.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/664. convert: missing an image filename655382767_1460008284.png' @ error/convert.c/ConvertImageCommand/3015.
++++++++++++++++++++++++++++++++++

请帮我解决它。 其他一些 pdf 文件也被完全转换为 png。

请找到在使用 Imagemagick convert 命令转换为 png 时出现问题的 pdf 文件的附件。

enter link description here

【问题讨论】:

  • 适用于 ImageMagick 6.9+。尝试更新您的 ImageMagick。
  • 看起来像索引错误。您只能提取现有页面 0-7,而不是 8 或 9。此外,您应该真正升级到 ImageMagick 6.9+
  • 我们如何知道pdf文件的页数?我还尝试了其他一些 2 到 6 页的 pdf 文件,并在转换时通过 [0-9]。但它工作正常。

标签: imagemagick ghostscript imagemagick-convert


【解决方案1】:

ioerror 表示存在 I/O 错误,这可能意味着磁盘已满,或者存在其他问题。尝试使用较低的分辨率(我认为 IM 术语中的“密度”)。假设您有 8 页,每页为 32x76 英寸,并且您的分辨率为 300 dpi,您正在查看生成大量数据,如果 depth=8 表示灰度,则约为 1.8Gb。

出现 ioerror 可能有许多其他原因,接下来要做的是尝试更新版本的 Ghostscript 8.70,现在已经 6 岁了..... 正如 Mark Setchell 建议的那样,您也可以尝试使用更新版本的 ImageMagick,但我怀疑这会有所帮助,因为它显然是从 Ghostscript 返回的错误。

【讨论】:

    猜你喜欢
    • 2011-02-21
    • 1970-01-01
    • 2020-05-31
    • 2018-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-06
    • 2020-10-31
    相关资源
    最近更新 更多