index rss mastodon twitter github linkedin email
Álvaro Ramírez
sponsor

Álvaro Ramírez

18 September 2016 Handy pdf utilities

Straight out of How (and why) I made a zine, some handy utilities for generating pdfs…

Convert pngs to pdfs

# start with a bunch of PNG images of your zine pages
# convert them all to PDF
for i in *.png
   do
      # imagemagick is the best thing in the world
      convert $i $i.pdf
   done

Combine pdfs

Combine pdfs using pdftk:

pdftk *.pdf cat output zine.pdf

Combine pdfs using poppler:

pdf unite PDF1.pdf PDF2.pdf PDF3.pdf

Reorder pdf pages

# pdfmod is a GUI that lets you reorder pages
pdfmod zine.pdf

Add margins to pdf

# pdfcrop lets you add margins to the pdf. this is good because otherwise the
# printer will cut off stuff at the edges
pdfcrop --margin '29 29 29 29' zine.pdf zine-intermediate.pdf

Turn pdf into booklet

# pdfjam is this wizard tool that lets you take a normal ordered pdf and turn
# it into something you can print as a booklet on a regular printer.
# no more worrying about photocopying machines
pdfjam --booklet true --landscape --suffix book --letterpaper --signature 12 --booklet true --landscape zine-intermediate.pdf -o zine-booklet.pdf