Combine PDF Files on Windows 11 Using WSL

As usual Linux has the most elegant and simple solution to a problem that should be easy to perform in Windows as well.

I simply want to combine multiple PDFs into one and not have to “upload” my documents to an online service to do so.

The simplest solution I found was to use Windows Subsystem for Linux (WSL) which worked a treat.


# How to combine PDF files on Windows 11 using WSL (Ubuntu)

# Install software that includes pdfunite utility
sudo apt install poppler-utils

# Install rename support
sudo apt install rename

# Change to directory where PDF files reside
cd /mnt/c/Users/USERNAME/Downloads/PDFs/

# Copy all needed files to temp directory
cp *.pdf ../TEMP

# Change to the temp directory
cd ../TEMP

# Replace all spaces in filenames with underscores
rename 's/ /_/g' *

# Combine all the PDFs in alphnumeric order
pdfunite $(ls -v *.pdf) combined.pdf

Poppler-utils is a collection of command-line tools used to view, manipulate, and convert PDF documents, built on the Poppler PDF rendering library.

The pdfunite utility included in poppler-utils merges multiple PDF files into one.

Similar outcome can be had in macOS via Homebrew:
brew install poppler

Leave a Comment