简体   繁体   English

使用ImageMagick将多页PDF拆分为JPG(或PNG…)文件

[英]Split multi-page PDF into JPG (or PNG…) files using ImageMagick

I'm facing a little problem with Image Magick, which I found a marvellous tool so far, but here it doesn't achieve what I expect (NB: I work in Windows 7) I read that, to split a 3 pages (for example) pdf file, you just have to do: 我在使用Image Magick时遇到了一个小问题,到目前为止,我发现了一个很棒的工具,但是在这里它并没有达到我的期望(注意:我在Windows 7中工作),我读到了这一点,将其分为3页(对于例如pdf文件,您只需要执行以下操作:

img2img My3pageFile.pdf SplittedImage.jpg

and then, ImageMAgick would automatically create SplittedImage-1.jpg, SplittedImage-2.jpg and SplittedImage-3.jpg. 然后,ImageMAgick将自动创建SplittedImage-1.jpg,SplittedImage-2.jpg和SplittedImage-3.jpg。

Well instead of this, I obtain an error message like this: (let me hope you'll believe me if I say that I have no doubt here under that the file "benef.pdf" does exist on D:). 好吧,相反,我收到了这样的错误消息:(让我希望您相信我,如果我说我毫无疑问在这里,文件“ benef.pdf”确实存在于D :)。

D:\>img2img benef.pdf benef.jpg
img2img: `%s': %s "gswin32c.exe" -q -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH 
-dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0
"-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-g595x842" "-r72x72"
"-sOutputFile=C:/Users/ADM-A2~1/AppData/Local/Temp/magick-o3McMMZQ" "-fC:/Users
/ADM-A2~1/AppData/Local/Temp/magick-EOLT_ZO2" "-fC:/Users/ADM-A2~1/AppData/Local
/Temp/magick-mUWMMcc0".
img2img: Postscript delegate failed `benef.pdf'.
img2img: missing an image filename `benef.jpg'.

The answer is simply to install and download GhostScript at the following address, after what the instruction I gave at the beginning works perfectly well. 答案很简单,就是在我一开始给出的说明完全正确之后,在以下地址安装和下载GhostScript。 So here's the link: 所以这是链接:

http://downloads.ghostscript.com/public/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 python 将多页 pdf 文件拆分为多个 pdf 文件? - split a multi-page pdf file into multiple pdf files with python? 在 R 中使用 Magick 将 .png 转换为多页 pdf - Convert .png to multi-page pdf using Magick in R 如何使用imagemagick处理多页PDF的每一页? - How to process each page of a multi-page PDF in place with imagemagick? 使用Zend Framework将多页.tif文件加载到PDF中 - Load Multi-page .tif files into PDF using Zend Framework ImageMagick或GhostScript:将多页TIFF转换为多页PDF - ImageMagick or GhostScript: convert a multi-page TIFF to a multi-page PDF 尝试将多页 PDF 转换为 MAC 上的 individual.png 文件时出现路径错误 - Path Error when trying to convert multi-page PDF to individual .png files on MAC 我可以检测 PNG 文件是否从多页 PDF 文件转换而来,并使用 ImageMagick 将图像拆分为单独的文件吗? - Can I detect if a PNG file was converted from a multiple page PDF file and split the image into separate files using ImageMagick? 使用ImageMagick和/或GhostScript将多页PDF转换为多个JPG - Converting multi-page PDFs to several JPGs using ImageMagick and/or GhostScript ImageMagick:PDF 到 PNG nodejs 而不使用文件? - ImageMagick: PDF to PNG nodejs without using files? 如何在不安装任何exe的情况下将多页PDF文件转换为多页Tiff - How to Convert Multi-Page PDF files to Multi-Page Tiff with out installing any exe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM