I have a small issue. I have generated a PDF file with some images generated from R. However the images render extremely slow, this might be due to the fact that the PDF needs to render an insane amount of data points. I realize that this is a problem, but I am not willing to change any of my images to a lower quality one by one or by the batch, because then I would have to change every image in my tex file again.

Instead what I would like to do is do some post-processing to get a smaller PDF where all images are simply converted to a JPEG with a quality level that I have specified. Is this possible?

I have tried the following: - Adobe Acrobat DC Pro > Save As > Reduced Size PDF played with all kind of options, but it still loads slowly. I even enabled all kinds of downsampling and enabled JPEG compression. - Save As > Optimized PDF it doesn't do much

Am I missing something crucial or is this feature simply not possible?


The "convert" utility from imagemagick tools may help you. These are essentially command-line tools. You don't say which operating system are you using, but if it's windows you may also find this page useful.

Basic usage: on a command-line terminal type:

convert -quality 75% file.pdf file.jpg

You can also convert to other formats (png, etc.) and use a plethora of other options. See the docs.

  • @Snowflake: One specific convert option you will probably want to invoke is "-density" to specify the number of pixels per pdf inch. For example, "convert -density 300x300 file.pdf file.png". – James Jan 20 '16 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.