将多页PDF转换为单个图像--%03d不工作
可以找到许多关于这方面的信息(例如)将多页PDF转换为单个图像--%03d不工作,pdf,imagemagick-convert,Pdf,Imagemagick Convert,可以找到许多关于这方面的信息(例如) 和其他人 我键入convert x.pdf x-%03d.png(或jpg结果相同),其中x.pdf是两页文档,我得到的文件x-%04d.png是第一页,而不是两个文件x-000.png和x-001.pngconvert x.pdf[1]x.png工作正常 我做错了什么 $ convert -version GraphicsMagick 1.3.20 2014-08-16 Q8 http://www.GraphicsMagick.org/ Copyr
- 和其他人
convert x.pdf x-%03d.png
(或jpg结果相同),其中x.pdf
是两页文档,我得到的文件x-%04d.png
是第一页,而不是两个文件x-000.png
和x-001.png
convert x.pdf[1]x.png
工作正常
我做错了什么
$ convert -version
GraphicsMagick 1.3.20 2014-08-16 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2014 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 yes
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG yes
JPEG-2000 yes
JPEG yes
Little CMS yes
Loadable Modules no
OpenMP yes (201307)
PNG yes
TIFF yes
TRIO no
UMEM no
WebP no
WMF yes
X11 yes
XML yes
ZLIB yes
Host type: x86_64-pc-linux-gnu
Configured using the command:
./configure '--build' 'x86_64-linux-gnu' '--enable-shared' '--enable-static' '--enable-libtool-verbose' '--prefix=/usr' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--docdir=${prefix}/share/doc/graphicsmagick' '--with-gs-font-dir=/usr/share/fonts/type1/gsfonts' '--with-x' '--x-includes=/usr/include/X11' '--x-libraries=/usr/lib/X11' '--without-dps' '--without-modules' '--without-frozenpaths' '--with-perl' '--with-perl-options=INSTALLDIRS=vendor' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-Wall -g -fno-strict-aliasing -O2' 'LDFLAGS=' 'CXXFLAGS=-Wall -g -fno-strict-aliasing -O2'
Final Build Parameters:
CC = gcc -std=gnu99
CFLAGS = -fopenmp -Wall -g -fno-strict-aliasing -O2 -Wall -pthread
CPPFLAGS = -I/usr/include/X11 -I/usr/include/freetype2 -I/usr/include/libxml2
CXX = g++
CXXFLAGS = -Wall -g -fno-strict-aliasing -O2 -pthread
LDFLAGS = -L/usr/lib/X11 -L/usr/lib -L/usr/lib
LIBS = -ljbig -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -lwmflite -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lgomp -lpthread
嗯,我的convert手册页没有丢失关于%04d选项的任何信息,但是如果你有ghostscript,我想人们会支持它,比如
gs-sOutputFile=x-%04d.png-dNOPAUSE-sDEVICE=png16m x.pdf-c quit
添加解析变量等。另一方面,根据tasteon,你的x-%04d.png输出文件名格式在我的convert中工作,很奇怪。然而,我的版本似乎更新了convert-版本:ImageMagick 6.7.7-10 2016-04-07 Q16http://www.imagemagick.org 版权所有:版权所有(C)1999-2012 ImageMagick Studio LLC功能:OpenMP
hm,我的转换手册页不会丢失关于%04d选项的任何信息,但是如果您有ghostscript,我想有人会支持它,比如gs-sOutputFile=x-%04d.png-dNOPAUSE-sDEVICE=png16mx.pdf-c quit
Add variables for resolution等。另一方面,根据tasteon的说法,你的x-%04d.png输出文件名格式在我的转换中工作,非常奇怪。然而,我的版本似乎更新了convert-版本:ImageMagick 6.7.7-10 2016-04-07 Q16http://www.imagemagick.org 版权:版权所有(C)1999-2012 ImageMagick Studio LLC功能:OpenMP