Home:ALL Converter>How to extract images from a PDF in pure Python?

How to extract images from a PDF in pure Python?

Ask Time:2014-11-28T19:07:11         Author:kramer65

Json Formatter

I'm developing a service in which I now need to extract images from a PDF file. From a Linux command line I can extract images using the Poppler library like this:

pdfimages my_file.pdf /tmp/image

Since I'm using the Python Flask framework and I want to run my service on Heroku I want to extract the images using pure Python (or any library that can run on Heroku in a Flask system).

So does anybody know how I can extract images from pdf in pure Python? I prefer open source solutions, but I'm willing to pay for it if needed (as long as it works under my own control on Heroku).

Author:kramer65,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/27187381/how-to-extract-images-from-a-pdf-in-pure-python
yy