On one of our local servers, I use
pdftoppm (v 0.18.4) to capture the first page of a pdf file as a 1200px wide jpg. It's very quick, and works very well. I'm doing it like so:
pdftoppm -f 1 -l 1 -scale-to-x 1200 -jpeg "$infile" "$outfile"
This is practically instantaneous in its execution.
On our live server, we have a more modern version of
pdftoppm (v 3.00) and it takes a long time (between 30-70 seconds) to produce the thumbnail, which I'm doing like so:
pdftoppm -f 1 -l 1 -r 1200 "$infile" "$outfile"
This took 35 seconds and produced a 400 MB image which was nearly 10,000 px wide, so that's obviously not correct! I can't seem to be able to control the resolution (which is obviously the source of the huge file size and conversion time), and I can't seem to be able to specify that the output is a jpg either: passing the
-jpeg option just makes pdftoppm output its options, which is the standard behaviour for "bad options given".
Can anyone tell me which options to pass to v 3.00 to get the same result as with the earlier version?
I think I should actually just try and downgrade our server version of
pdftoppm to the same one I have locally, but before I do that I want to see if I'm missing something. The man page for v3.00 is here: http://linux.die.net/man/1/pdftoppm