ruk·si

Poppler PDF Tools

Updated at 2018-06-08 16:23
brew install poppler
# split a PDF to pages a1.pdf, a2.pdf...
pdfseparate receipts.pdf a%d.pdf
# combine PDF pages to a single document
pdfunite a1.pdf a2.pdf receipts.pdf.pdf
# list images in a PDF
pdfimages -list receipts.pdf

# save all images in PDF as PNGs
pdfimages -png receipts.pdf ./
# list the embedded files in a PDF
pdfdetach -list book.pdf

# save all embedded files in a PDF
pdfdetach -saveall book.pdf
# list fonts used in a PDF
pdffonts deck.pdf
# convert PDF pages to images
pdftocairo receipts.pdf ./
# convert PDF pages to HTML
pdftohtml receipts.pdf ./out.html
# convert PDF to PPM
pdftoppm receipts.pdf ./
# convert PDF to PostScript
pdftops receipts.pdf ./out.ps
# convert PDF to a text file
pdftotext receipts.pdf ./out.txt