title: Replacing vector images in a PDF with raster images
body: <p>Is there any easy (scriptable) way to convert a PDF with vector images into a PDF with raster images? In other words, I want to generate a PDF with the exact same (un-rasterized) text but with each vector image replaced with a rasterized version.</p>
  
  <p>I occasionally read PDFs of technical articles on my Kindle, and have found that reading a PDF directly is frustrating. Thankfully, Amazon's <a href="https://www.amazon.com/gp/help/customer/display.html/ref=hp_200767340_s2kemail?nodeId=200767340#s2kemail">automatic conversion</a> of PDFs to the Kindle format does a good job of reflowing the text portions of most of PDFs I have tried. However, while raster images seem to make it through the conversion process fine, vector images get horribly mangled. It would be great if I could easily convert a PDF so that all of its vector images were rasterized.</p>
  
  <p>I am interested in any possible solutions, but a Linux- or Windows-based one would be preferable.</p>