PDF cheatsheet

Some common PDF-related commands I find myself doing and forgetting.

# Convert a bunch of images to an OCR'd PDF
# Relies on my own img2pdf script:
#  http://kueda.net/blog/2015/06/20/converting-images-of-text-to-searchable-pdfs/
#  https://gist.github.com/kueda/c02b9f3f5a0f03f41524
img2pdf *.jpg
# Make a PDF of scanned page images searchable
# pdfimages comes with Poppler, which you'll need to get img2pdf working
mogrify -negate *.pbm # pdfimages seems to invert colors for some reason
img2pdf *.pbm