【发布时间】: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 文件的附件。
【问题讨论】:
-
适用于 ImageMagick 6.9+。尝试更新您的 ImageMagick。
-
看起来像索引错误。您只能提取现有页面 0-7,而不是 8 或 9。此外,您应该真正升级到 ImageMagick 6.9+
-
我们如何知道pdf文件的页数?我还尝试了其他一些 2 到 6 页的 pdf 文件,并在转换时通过 [0-9]。但它工作正常。
标签: imagemagick ghostscript imagemagick-convert