Export images from a PDF file

I have previously written about how to export each of the pages of a PDF file as an image. That works well for, for example, presentation slides that should go on a web page. But sometimes there is a need to export only the images within a page. This can be achieved with a small command line tool called pdfimages.

One way of using it is:

pdfimages -p -png file.pdf image

This will export all images in file.pdf and label them with something like image-001-010.png, where the first number refers to the page and the second is a count of images.

Sometimes I just take a screenshot if I want to grab something from a PDF. But this is a more robust method if you want to grab several different images from a PDF file.

Published by

alexarje

Alexander Refsum Jensenius is a music researcher and research musician living in Oslo, Norway.