pdf

Create handouts from slides in pdf

6 slides on a page:

pdfjam --nup 2x3 --frame true --noautoscale false --delta "0.2cm 0.3cm" --scale 0.95 IN.pdf --outfile OUT.pdf

Cropping

pdfcrop is nice and simple (but the pdf might grow to 7 times the original size...)

pdfcrop in.pdf out.pdf 

To get a small margin use:

--margins '5'

Gui tool (manual framing, but with numbers):

pdfshuffler

Joining

pdfjoin -o DESTINATION.pdf 1.pdf 2.pdf 3.pdf ...

If it rotates pages, go directly to pdfjam:

pdfjam --fitpaper 'true' --suffix joined --outfile DESTINATION.pdf -- 1.pdf 2.pdf 3.pdf ...

jpgs to pdf

Use ImageMagick?:

convert *jpg -page a4 out.pdf

pdf to text

Dumping real text in the pdf:

pdftotext in.pdf out.txt

pdf to jpg

Convert pdf to jpg:

convert -density 300 -trim IN.pdf -quality 100 OUT.jpg

Will create n jpgs (if there are n>1 page in the PDF), named OUT-0.jpg OUT-1.jpg etc.

Split (and join)

Pick some pages in a pdf and join to a new pdf:

pdftk in.pdf cat 1 3 5-9 output out.pdf

Select first 3 pages:

pdftk in.pdf cat 1-3 output out.pdf

Fix broken pdf

pdftocairo -pdf in.pdf out.pdf

Package: poppler-utils

Save embedded files

pdfdetach -saveall in.pdf

Move pdf on page

Move box from upper left corner towards center of page:

pdfjam --offset "+5cm -5cm" --a4paper in.pdf -o out.pdf