cli pdf utilities

Dec 15, 2021 | linux

There have been multiple instances where I search for cli pdf utilies and always end up in stackoverflow searching for a tool that has minimal dependencies and with the required set of options. I usually end up using the utilies pdfunite and pdfseparate found in the poppler (arch) or poppler-utils (debian/ubuntu based) package. I occasionally find myself using qpdf or gs too. (will update)

combining pdfs

pdfunite commands comes to the rescue:

pdfunite PDF-sourcefile1..PDF-sourcefilen PDF-destfile

example (from the man page):

# merges all pages from sample1.pdf and sample2.pdf (in that order) and creates sample.pdf
pdfunite sample1.pdf sample2.pdf sample.pdf

extracting individual pages

In many cases when you are submitting documents to a website, you scan the hardcopies all at once and end up with a single pdf. If now the website requires you to submit them separately (which is usually the case), you can use pdfseparate.

I will be updating this post to add more tools eventually

~ end of post ~