gpt4 book ai didi

pdftopm 无法创建输出

转载 作者:行者123 更新时间:2023-12-05 07:39:55 25 4
gpt4 key购买 nike

我正在从命令提示符运行 pdftopm,但它无法创建任何输出。

这是我的意见

c:\test>pdftoppm -r 600 png W10475.pdf 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 文件夹。我认为 pdftopm.exe 会写入调用它的同一文件夹。我是不是弄错了,或者只是没有写入输出?如果是这样,我如何让它生成一些输出。

最佳答案

随着时间的推移,问题变得过时了,现在对于 2021 年的 Windows 用户来说,答案大不相同,但是混淆通常是由于您运行的是两组 pdfto### 实用程序中的哪一组

首先,问题是为什么从 Utils 生成 PNG 的 Xpdf 命令无法按照 Poppler utils 工作。但是,您需要使用专用的 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

对于 Poppler 21.##用户您仍然需要使用带有 -png 选项的 pdftopm 命令。

poppler-21.09.0\Library\bin> pdftoppm -r 600 -png file.pdf test

这将产生类似的输出文件 test-1.png

关于pdftopm 无法创建输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46698234/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com