Skip to content

Instantly share code, notes, and snippets.

@miloskroulik
Last active February 16, 2024 01:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miloskroulik/46ad39cf7eba8aef2c6f to your computer and use it in GitHub Desktop.
Save miloskroulik/46ad39cf7eba8aef2c6f to your computer and use it in GitHub Desktop.
Convert PDF to PNG with poppler-utils #linux #pdf #png

In the poppler-utils packages there is the utility pdftoppm capable of converting pages from a pdf file to ppm, png or jpeg format:

pdftoppm -png file.pdf prefix

will produce prefix-01.png etc. for each page. By default the resolution is 150dpi. Increase the resolution (for higher quality output) as follows:

pdftoppm -rx 300 -ry 300 -png file.pdf prefix

source: http://askubuntu.com/a/50180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment