title: How to extract images from a PDF in pure Python?
body: <p>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 <a href="http://poppler.freedesktop.org/" rel="nofollow">Poppler library</a> like <a href="http://www.cyberciti.biz/faq/easily-extract-images-from-pdf-file/" rel="nofollow">this</a>:</p>
  
  <pre><code>pdfimages my_file.pdf /tmp/image
  </code></pre>
  
  <p>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).</p>
  
  <p>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).</p>