How Do You Merge .pdfs with Linux?

Problem scenario
You want to combine several PDF files. But you don't want to upload them to a website. How do you do this for free with a Debian distribution of Linux?

Run this command:

sudo apt -y install poppler-utils

Run this command (where 1.pdf is the first file you want to be merged with the first pages, foobar.pdf is a file you want in the middle of your single PDF result, and last.pdf is the pdf with the last pages you want in a final combined PDF called combination.pdf):

pdfunite 1.pdf foobar.pdf last.pdf combination.pdf

# Note this assumes you have in your directory files called 1.pdf, foobar.pdf, and last.pdf.

Leave a comment

Your email address will not be published. Required fields are marked *