Miscellaneous

Merging and/or compressing pdf files on Linux

  • Using Ghostscript: Using the following script, you can both merge and compress your pdf files. Save the following in a file `mergepdf` and make it an executable.
#!/bin/sh gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$@"

Then, you can simply use it as

mergepdf output.pdf file1.pdf file2.pdf file3.pdf

If you want to only compress a pdf file, then, provide that file, as

mergepdf output.pdf input.pdf

Reference: http://tex.stackexchange.com/questions/75535/moderncv-filesize-of-pdf-too-big

  • Pdf-shuffler: a small, but very nice python-gtk application, which helps the user to merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface. Install: sudo apt-get install pdfshuffler
  • Here is an online utility to merge and/or compress pdf files (I have not tried yet): http://smallpdf.com/compress-pdf
  • Pdf size optimizer, Python script: https://github.com/pts/pdfsizeopt

Reducing the eps file size with convert, by using level 3 postscript: convert image.png eps3:image.eps (reference)

With mogrify: mogrify -format eps3 *.png (then, can rename as .eps : rename .eps3 .eps *.eps3)