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%.

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 I know this answer but unfortunately it doesn't answer my question. – Frank Breitling Jan 30 '16 at 15:42
  • This is essentially a link-only answer, and would be better suited as a comment. – sodd Feb 18 '16 at 13:01
  • Not enough reputation to reply directly by comment. Edited the answer. – Georges Feb 18 '16 at 13:35

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.