Adding a header and footer

Adding a header and footer to a set of slides

pdftk slides.pdf stamp footer.pdf output print.pdf

You can also take a look to the documentation for background and multibackground keywords

more ...

Adding bookmarks using GS

gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=out.pdf in-*.pdf pdfmarks

Where out.pdf is the generated PDF, in- * .pdf are the input PDFs, and pdfmarks is a text file with contents like:

[/Title (Title Page) /Page 1 /OUT pdfmark
[/Title (Table of Contents) /Page 3 /OUT pdfmark
...

Nice and ...

more ...

Extract pages

You can extract the pages from a pdf (or from several) and join them in another one:

pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 output combined.pdf

You can extract pages from a pdf using Ghostscript:

gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dFirstPage=1 -dLastPage=7 -o extracted ...
more ...

Reduce the size

You can use GhostScript for reducing the size of a pdf

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

There are several options:

-dPDFSETTINGS=/screen  (75ppp)
-dPDFSETTINGS=/ebook   (150ppp)
-dPDFSETTINGS=/printer (300ppp)

If you use the printer option you may get a ...

more ...

Remove password

You can use ghostscript for removing the password of a PDF

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf
more ...

Trace all the fonts

You can trace all the fonts in a pdf using this command:

gs -o file-with-outlines.pdf -dNoOutputFonts -sDEVICE=pdfwrite file.pdf
more ...