Generalcompress pdf, reduce graphics size selectively

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Zem
Posts: 4
Joined: Wed Aug 15, 2007 7:53 pm

compress pdf, reduce graphics size selectively

Post by Zem »

Is there an easy way to generate pdf output with different compression settings?
Such as a pdflatex switch or a tool to recompress the resulting pdf?

- One version with highest-dpi, non-lossy images where size does not matter.
- And one version with lower-dpi downsampled images with stronger lossy compression.

I could of course create different versions of the embedded images for each version, but that would get confusing quick, and it is hard to get the same dpi settings for various images embedded with size=1\textwidth

I am using texniccenter with miktex and pdflatex on windows.

I think I already embedded every vector graphic as eps/pdf where applicable. The remaining images have to be pixel graphics.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

compress pdf, reduce graphics size selectively

Post by localghost »

The only idea that comes to me is to give a compress level in the preamble.

Code: Select all

\pdfcompresslevel=n   % n=1,...,9
I don't know in which way this affects the pixel based images.


Best regards and welcome to the board
Thorsten¹
Zem
Posts: 4
Joined: Wed Aug 15, 2007 7:53 pm

Re: compress pdf, reduce graphics size selectively

Post by Zem »

Thanks, but according to what I found, I already use the maximum level, since it is set by hyperref.
Also, it is only lossless compression without any change in appearance, so savings are rather low.
Post Reply