[Tex/LaTex] Latex generated PDF is extremely slow with rendering images

pdfsvg

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?

Best Answer

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.