I have this latex document comprising many vector graphics (PDF files) representing plots, each one consisting of many small elements.
When I compile it with
pdflatex, I end up with a fairly large document of ~12MB.
The major issue here, size apart, is that this colossus highly slows down my (and I suppose others') pdf reader (evince on Ubuntu in my case) to the point that is freezes up for some seconds.
This may sound like the average 'reduce pdf size' question here, however I am not getting any help from all the solutions found in all the answers I read. For instance, setting these tex commands does not change a thing:
\pdfminorversion=5 \pdfobjcompresslevel=3 \pdfcompresslevel=9
I've also looked into all the tools like
pdfsizeopt, but since I do not have raster images, I cannot degrade them. Plus, going from my vector images to raster one would mean losing a lot of details.
Up to now, I have found a decent solution with opening the file with
evince and print it to pdf again. This dramatically reduces the size to just 4 MB. It preserves the vector quality of all images, and also drastically reduces the rendering time for the pages full of such images.
I am wondering if this relates to the fact that by printing it somehow simplifies the vector drawings; like preserving only the objects or their parts which "stay in the front".
However, this may be not what I need in the end. What I am looking for is a way to embed the pdf output file compression directly into the latex pipeline. My major issue is that my sources will be compiled by a third party like a journal or the arXiv, so they will end up with a very big file in the end, which will make reading it painful. And I cannot tell them: "Open evince, then..."
Could I call something like evince from the command line on each image and then embed this preprocessed and optimized versions in my sources? Can I call some command from latex to optimize the output for print (supposing it is doing something like evince did)?