moderncv - filesize of pdf too big
There is no package makemypdfsmaller.sty
which reduces the PDF
file size without removing information. However, there are a few
things you can do:
Reduce number of images
Do you really need to include eighteen images? Maybe sixteen or twelve is enough.
Reduce image size
You can use imagemagick (or gimp or …) to reduce the image size. You have to experiment which values are acceptable.
convert -geometry 75% input.png output.png
Reduce amount of colours
Especially when the image contains text on white background or just a few colours, like certificates often do, you can significantly reduce the image size. Try different values, e.g. 4, 8, 16
convert -colors 16 input.png output.png
Run optipng
on the file
The program optipng
can shrink the file about one to four percent
more after you have reduced the amount of colours. Not much, but
it's lossless. The slowest setting with the highest compression is -o7
.
optipng -o7 input.png
Increase PDF compression
Set \pdfcompresslevel9
. This also does not help much, but maybe it
helps to squeeze it just enough to fit into a file size limit.
Reducing the final PDF
When you already created the PDF or you don't have access to the
images any more, you can use ghostscript to reduce the resolution of
the final PDF. Use for instance the setting -dPDFSETTINGS=/ebook
. Here is
an example.
gs \
-sOutputFile=output_file.pdf \
-sDEVICE=pdfwrite \
-dNOPAUSE \
-dBATCH \
-dPDFSETTINGS=/ebook \
input_file.pdf
/ebook
sets the resolution to 150 DPI. Other settings are
/screen
(75 DPI) or /print
(300 DPI).