[poppler] [PATCH] pdftoppm, SplashBitmap: stdin input, stdout output, cropping, scale-to

Ilmari Heikkinen ilmari.heikkinen at gmail.com
Fri Jul 20 23:36:47 PDT 2007


Hi, this patch adds the following features to pdftoppm:

  * if omitting input filename or using - for input filename, reads
pdf from stdin
    - e.g. pdftoppm -f 1 -l 1 < foo.pdf | ppmtojpeg > foo.jpg
    - e.g. pdftoppm - foo_images < foo.pdf

  * if omitting output filename, prints output to stdout
    - e.g. pdftoppm -f 1 -l 1 foo.pdf | ppmtopng > foo.png

  * create image of a cropped rectangle of the pdf
    - e.g. -x 30 -y 40 -W 500 -H 400

  * scale pdf to fit in a square of wanted size
    - e.g. -scale-to 2048 to create image with max dimension 2048

It also overloads SplashBitmap::writeToPNM to accept FILE* argument
(in order to write to stdout).

The patch is against the CVS head, created with cvs diff -d -u
-------------- next part --------------
A non-text attachment was scrubbed...
Name: poppler-pdftoppm-stdout-crop.diff
Type: application/octet-stream
Size: 7948 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20070721/15d78682/attachment.obj 


More information about the poppler mailing list