На Ubuntu 10.04 я установил пакет poppler-utils для запуска pdftoppm.Почему у pdftoppm poppler-utils нет опции jpeg?
Моя цель - конвертировать PDF-файлы в jpegs, однако у меня нет этого параметра/флага. Единственный растеризатор, который у меня есть, - поддержка PNG.
Может кто-нибудь, пожалуйста, сообщите, как я могу получить поддержку jpeg? Большое спасибо.
(см мой список опций ниже после запуска: pdftoppm --help):
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
Вы можете сгенерировать PNG и преобразовать его в JPEG. См. Http://superuser.com/questions/71028/batch-converting-png-to-jpg-in-linux – Theolodis
Я действительно мог бы, но я пытался сократить время, затрачиваемое на преобразование 500-страничного PDF в jpegs. К сожалению, этот дополнительный шаг займет слишком много времени. Я использовал ImageMagik и GhostScript, но они заняли слишком много времени (около 20 минут, чтобы сделать 500 PDF-страниц для jpeg). – seb835
вы могли бы повысить скорость, установив libjpeg-turbo вместо библиотеки ligjpeg. – Theolodis