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


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

1 Answer 1


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. Jan 30, 2016 at 15:42
  • This is essentially a link-only answer, and would be better suited as a comment.
    – sodd
    Feb 18, 2016 at 13:01
  • Not enough reputation to reply directly by comment. Edited the answer.
    – Georges
    Feb 18, 2016 at 13:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .