我从命令提示符运行pdftoppm,但它无法创建任何输出。
这是我的意见
c:\test>pdftoppm -r 600 png W10475.pdf test下面是关联的“test”目录中的文件
c:\test>dir
Volume in drive C is OS
Volume Serial Number is 32C5-D3A1
Directory of c:\test
10/11/2017 03:36 PM <DIR> .
10/11/2017 03:36 PM <DIR> ..
10/06/2017 10:00 PM 42,552 convert.exe
10/06/2017 10:00 PM 42,552 magick.exe
08/08/2017 04:22 PM 1,179,648 pdfinfo.exe
08/08/2017 04:22 PM 1,988,096 pdftoppm.exe
08/08/2017 04:22 PM 1,239,040 pdftotext.exe
06/02/2017 12:24 PM 805,964 tesseract.exe
10/09/2017 02:36 PM 5,076,873 W10475.pdf
10/09/2017 02:37 PM 6,376,241 W10926.pdf
10/09/2017 02:37 PM 7,272,812 W11240.pdf
10/09/2017 02:37 PM 11,403,203 W11285.pdf
10/09/2017 02:37 PM 4,576,258 W11292.pdf
10/09/2017 02:37 PM 5,819,421 W11335.pdf
12 File(s) 45,822,660 bytes
2 Dir(s) 53,296,689,152 bytes free这是我命令的输出
pdftoppm version 4.00
Copyright 1996-2017 Glyph & Cog, LLC
Usage: pdftoppm [options] <PDF-file> <PPM-root>
-f <int> : first page to print
-l <int> : last page to print
-r <number> : resolution, in DPI (default is 150)
-mono : generate a monochrome PBM file
-gray : generate a grayscale PGM file
-freetype <string>: enable FreeType font rasterizer: yes, no
-aa <string> : enable font anti-aliasing: yes, no
-aaVector <string>: enable vector anti-aliasing: yes, no
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? : print usage information没有抛出错误消息,也没有写入c:\test文件夹的文件。我以为pdftoppm.exe会写到它调用的同一个文件夹。我是弄错了,还是没有写输出?如果是这样的话,我如何让它生成一些输出。
发布于 2021-09-04 18:12:14
问题会随着时间的推移而过时,现在windows用户的答案在2021年有了很大的不同,然而,混淆的原因往往是您正在运行的两组中的哪一组pdfto### utils。
首先,问题是为什么从utils生成PNG的Xpdf命令不像Poppler那样工作。但是,您需要使用专用pdftopng exe。(请注意上面的G&C pdftoppm帮助屏幕清楚/没有将-png显示为有效的输出选项)
pdftopng.exe -v4##-将一个PDF文件转换为一系列PNG图像文件。
pdftopng -r 600 file.pdf test将产生输出文件test-000001.png等。
注意,您可以添加可选的-alpha,还有许多其他选项,下面是当前的4.03帮助屏幕。
pdftopng --help
pdftopng version 4.03 [www.xpdfreader.com]
Copyright 1996-2021 Glyph & Cog, LLC
Usage: pdftopng [options] <PDF-file> <PNG-root>
-f <int> : first page to print
-l <int> : last page to print
-r <number> : resolution, in DPI (default is 150)
-mono : generate a monochrome PNG file
-gray : generate a grayscale PNG file
-alpha : include an alpha channel in the PNG file
-rot <int> : set page rotation: 0, 90, 180, or 270
-freetype <string>: enable FreeType font rasterizer: yes, no
-aa <string> : enable font anti-aliasing: yes, no
-aaVector <string>: enable vector anti-aliasing: yes, no
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-q : don't print any messages or errors
-cfg <string> : configuration file to use in place of .xpdfrc
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? : print usage information对于波普尔21.##用户,仍然需要使用pdftoppm命令和-png选项。
poppler-21.09.0\Library\bin> pdftoppm -r 600 -png file.pdf test这将产生类似的输出文件test-1.png等。
发布于 2018-03-12 14:18:26
命令必须是:pdftoppm -r 600 -png W10475.pdf test
https://stackoverflow.com/questions/46698234
复制相似问题