Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Convert pdf to jpg

Quick and dirty, but way better than convert input.pdf output.jpg. I'm assuming there was a resolution setting somewhere for "convert" that I never bothered to research.

pdftoppm -jpeg -r 300 input.pdf output

Specifically omit the extension, because you will get files like output-1.jpg, output-2.jpg, et al.: one for each page.

References

Ripped shamelessly from:

  1. How to convert a PDF into JPG with command line in Linux? - Stack Overflow

Comments