【发布时间】:2017-03-15 00:24:24
【问题描述】:
我正在尝试将 pdf 文档(95 页)转换为多个 JPEG 文件,但出现错误:
$gm convert -verbose -density 300 TESTIO.pdf +adjoin FOO-%02d.jpg
[ghostscript library] "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=pnmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r300x300" "-sOutputFile=/tmp/gm2BfrxJ" "--" "/tmp/gmWNsJU0" "-c" "quit"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-- 24 1 95 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1745 0 9 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:1/20(G)-- --dict:76/200(L)-- --dict:76/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:22/40(L)--
Current allocation mode is local
Last OS error: 28
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
gm convert: Unexpected end-of-file (/tmp/gm2BfrxJ).
这是 GraphicsMagick 的配置:
$gm version
GraphicsMagick 1.3.25 2016-09-05 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2016 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType no
Ghostscript (Library) yes
JBIG no
JPEG-2000 no
JPEG yes
Little CMS no
Loadable Modules no
OpenMP yes (200805)
PNG no
TIFF yes
TRIO no
UMEM no
WebP no
WMF no
X11 no
XML no
ZLIB no
Host type: x86_64-unknown-linux-gnu
Configured using the command:
./configure '--prefix=/usr/local' '--with-modules=yes' '--with-libtiff' '--with-jpeg' '--with-gslib'
Final Build Parameters:
CC = gcc -std=gnu99
CFLAGS = -fopenmp -g -O2 -Wall -pthread
CPPFLAGS =
CXX = g++
CXXFLAGS = -pthread
LDFLAGS =
LIBS = -ltiff -ljpeg -lgs -lm -lgomp -lpthread
还有:
$ gs -version
GPL Ghostscript 9.20 (2016-09-26)
Copyright (C) 2016 Artifex Software, Inc. All rights reserved.
【问题讨论】:
-
您的 /tmp 文件系统是否已满?
标签: pdf ghostscript graphicsmagick