Autonomía digital y tecnológica

Código e ideas para una internet distribuida

Linkoteca. PDF


There is also a different type of PDF known as PDF/A. PDF/A is a subset of PDF that is meant for archiving information. In order to preserve the information in the file and to ensure that the contents will still appear as it should even after a very long time of storage, PDF/A sets stricter standard than those used by PDF.

PDF/A is a special type of PDF meant for archiving documents
PDF/A does not allow audio, video, and executable content while PDF does
PDF/A requires that graphics and fonts be embedded into the file while PDF does not
PDF/A does not allow external references while PDF does
PDF/A does not allow encryption while PDF does

Ghostscript is a great tool for compressing PDFs. In our tests it delivered the best compression ratio. Simply run:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf

-dPDFSETTINGS can be any of:
/screen : low-resolution output, lowest output size
/ebook : medium-resolution output, medium output size
/printer OR /prepress : high-resolution with maximum output size

Run the Shrinkpdf script:

./shrinkpdf in.pdf out.pdf

The script is almost same as the explicit gs command above. However, it has one advantage – it does an output file size check.