1

When I pdflatex my moderncv.tex I obtain a file size of 150 kB. This seems too big since I don't include any picture yet. And in fact after

gs -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH \
-sOutputFile=small.pdf moderncv.pdf

the file size is only 50 kB.

So how can I obtain a similar file size right away with pdflatex?

I have already tried adding

\pdfminorversion=5
\pdfobjcompresslevel=3 
\pdfcompresslevel=9

But this only reduced the file size by about 1%.

1 Answers1

2

This extensive answer includes the most up-voted solution:

Many solutions exist ranging from the use of gs to pdfsizeopt. By Ghostscript (gs) to optimise and compress the PDF after its creation with pdflatex.

The suggested solution:

 gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=foo-compressed.pdf foo.pdf

providing up to 60/70% in size reduction.

Georges
  • 411