在Ubuntu10.04上,我安装了poppler软件包,以便能够运行pdftoppm。
我的目标是将PDF转换为jpegs,但是我没有那个选项/标志可用。我似乎只有PNG支持的光栅化器。
有人能告诉我怎么才能得到jpeg的支持吗?非常感谢。
(运行后请参见下面的选项列表: pdftoppm -帮助):
pdftoppm version 0.12.4
Copyright 2005-2009 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2004 Glyph & Cog, LLC
Usage: pdftoppm [options] [PDF-file [PPM-file-prefix]]
-f <int> : first page to print
-l <int> : last page to print
-r <fp> : resolution, in DPI (default is 150)
-rx <fp> : X resolution, in DPI (default is 150)
-ry <fp> : Y resolution, in DPI (default is 150)
-scale-to <int> : scales each page to fit within scale-to*scale-to pixel box
-scale-to-x <int> : scales each page horizontally to fit in scale-to-x pixels
-scale-to-y <int> : scales each page vertically to fit in scale-to-y pixels
-x <int> : x-coordinate of the crop area top left corner
-y <int> : y-coordinate of the crop area top left corner
-W <int> : width of crop area in pixels (default is 0)
-H <int> : height of crop area in pixels (default is 0)
-sz <int> : size of crop square in pixels (sets W and H)
-cropbox : use the crop box rather than media box
-mono : generate a monochrome PBM file
-gray : generate a grayscale PGM file
-png : generate a PNG 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
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? : print usage information发布于 2013-09-11 08:33:20
根据此页,结果应该可以使用选项-jpeg生成jpeg映像。如果你不能,也许你应该得到一个更新的版本,如果你被允许的话。
如果不是的话,唯一的解决办法就是事后转换它。但是无论如何,如果你觉得JPEG转换太慢,我会建议你使用利比伯-涡轮。如果您替换了标准的libjpeg库,那么至少应该可以提高因子2的性能。
发布于 2019-11-14 05:27:59
看起来,旧版本pdftoppm没有提供像JPEG图像那样导出PDF的功能。只有较新的版本支持这一点,我使用的是0.82.0版本。我可以确认此版本支持导出PDF格式为JPEG或TIFF图像。
https://stackoverflow.com/questions/18719256
复制相似问题