# Replacing vector images in a PDF with raster images [closed]

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 text but with each vector image replaced with a rasterized version.

I occasionally read PDFs of technical articles on my Kindle, and have found that reading a PDF directly is frustrating. Thankfully, Amazon's automatic conversion 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.

I am interested in any possible solutions, but a Linux- or Windows-based one would be preferable. I can also get access to Adobe Acrobat if necessary.

-

## closed as off topic by Roelof Spijker, diabonas, doncherry, egreg, WernerMar 7 '12 at 15:20

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

Are you generating the PDF with TeX or related programs? –  egreg Mar 7 '12 at 7:39
I am not generating the PDFs myself; I am trying to convert articles downloaded from other sources such as the ACM Digital Library or IEEE Xplore. I assume that most of the authors did use TeX originally, but that's probably not relevant since I don't have access to the source. –  Michael Boyer Mar 7 '12 at 13:22
@MichaelBoyer: This question was closed as off-topic since it doesn't actually pertain to (La)TeX even though some of the original documents may be written using (La)TeX. I would consider this a most-production modification that requires applications outside the scope of this Q&A. Perhaps a better choice would be Stack Overflow. You can register the same account across the entire StackExchange network. –  Werner Mar 7 '12 at 15:23
@Werner: Agreed that this is not technically a TeX question. After looking at all of the available StackExchange sites, I thought users here might be most likely to know the answer to this question. I'll try my luck at Stack Overflow. Thanks for the pointer. –  Michael Boyer Mar 7 '12 at 19:11

Such a provision is provided by Nitro Pro. In the full version of nitro pdf professional (version 7 as I checked), one can extract images (Home->convert->To other) into individual `.png` files.

-
Interesting. This potentially solves part of the problem (generating raster versions of the images). But I still would need to generate a new PDF with the original text plus the rasterized images. And I'm skeptical that this can be automated; I don't want to have to manually convert each PDF, one image at a time. –  Michael Boyer Mar 7 '12 at 13:28
I just realized that my original question might not have been clear that the final output should be a new PDF, not a set of rasterized images. I have updated it to clarify this. –  Michael Boyer Mar 7 '12 at 13:38

I can convert vector PDF to raster PDF using ImageMagick, but it converts the text as well:

``````convert -density 92 original.pdf rastered.pdf
``````

You can choose whatever density you wish, and change other parameters as well quite easily. For details, discuss the documentation.

If you generate PDFs using LaTeX, see question Choosing whether to include PDF or PNG in PDFLaTeX.

-
Thanks for the tip. Unfortunately, rasterizing the text basically defeats the whole purpose, which is to be able to reflow the PDF so it is more natural to read on the Kindle. –  Michael Boyer Mar 7 '12 at 13:30