How-To GuidesMarch 13, 2026

How to Merge PDF on Linux

Linux users have several excellent options for merging PDF files, from powerful command-line tools to fast browser-based utilities. Whether you're running Ubuntu, Fedora, Arch, or any other distribution, you can combine multiple PDFs into one document without proprietary software. Merging PDFs is a common task for developers, researchers, and office workers alike. You might need to combine invoices, assemble a multi-chapter report, or collate scanned pages into a single document. Linux gives you both lightweight GUI-free methods and instant browser alternatives. This guide covers how to merge PDFs on Linux using an online tool, the popular pdftk command, and pdfunite from poppler-utils — so you can choose the method that fits your workflow.

Merge PDFs on Linux Using a Browser Tool

The fastest way to merge PDFs on any Linux distro is through a browser-based tool. No package installation required — just open Firefox or Chromium, go to LazyPDF, and upload your files. The tool combines them in the order you arrange them and returns a single merged PDF for download. This method works on headless setups with a GUI and requires no sudo privileges, making it ideal for quick one-off merges without touching the terminal.

  1. 1Open Firefox or Chromium on your Linux machine and navigate to lazy-pdf.com/merge
  2. 2Click 'Choose Files' and select all the PDFs you want to combine
  3. 3Drag to reorder the files if needed to set the correct page sequence
  4. 4Click 'Merge PDF' and download the combined file when processing finishes

Merge PDFs Using pdftk on Linux

pdftk (PDF Toolkit) is a classic command-line tool for merging, splitting, and manipulating PDFs. On Debian/Ubuntu, install it with `sudo apt install pdftk`. On Fedora, use `sudo dnf install pdftk`. Once installed, merge files with a single command: `pdftk file1.pdf file2.pdf file3.pdf cat output merged.pdf`. You can also use wildcard patterns like `pdftk *.pdf cat output merged.pdf` to combine all PDFs in a directory. pdftk preserves bookmarks and metadata from the input files.

Merge PDFs Using pdfunite (poppler-utils)

pdfunite is part of the poppler-utils package and is available on almost every Linux distribution. Install it with `sudo apt install poppler-utils` (Debian/Ubuntu) or `sudo dnf install poppler-utils` (Fedora). The syntax is straightforward: `pdfunite file1.pdf file2.pdf output.pdf`. Unlike pdftk, pdfunite does not preserve interactive form fields or bookmarks, but it's reliable for plain document merging and is often already installed on developer systems. It handles large files efficiently and runs fast even on older hardware.

Choosing the Right Method for Your Linux Workflow

For quick, one-off merges with reordering, the browser tool is most convenient. For scripted workflows, CI pipelines, or batch processing, pdftk or pdfunite are better choices. pdftk is more feature-rich (it can handle encryption, form data, and metadata), while pdfunite is simpler and faster for basic concatenation. If you're on a minimal server without a GUI, pdfunite is usually the easiest to install. For document pipelines that run automatically on a schedule, embed the command in a bash script and combine with find or ls to process folders of PDFs.

Fixing Common Merge Issues on Linux

If pdftk throws a 'Couldnt load PDF' error, the input file may be corrupt or password-protected. Try removing the password first with qpdf: `qpdf --decrypt input.pdf output.pdf`. If pdfunite produces a blank or truncated output, check that all input files are valid PDFs using `pdfinfo filename.pdf`. For very large merges (100+ files), pass arguments via a file list to avoid shell argument length limits. If fonts appear wrong after merging, ensure both source PDFs have embedded fonts rather than relying on system fonts. Modern PDF tools leverage WebAssembly and JavaScript libraries to process documents directly within your web browser. This client-side processing approach offers significant advantages over traditional server-based solutions. Your files remain on your device throughout the entire operation, eliminating privacy concerns associated with uploading sensitive documents to remote servers. The processing speed depends primarily on your device capabilities rather than internet connection speed, which means operations complete almost instantaneously even for larger files. Browser-based PDF tools have evolved considerably in recent years. Libraries like pdf-lib enable sophisticated document manipulation including page reordering, merging, splitting, rotation, watermarking, and metadata editing without requiring any server communication. This technological advancement has democratized access to professional-grade PDF tools that previously required expensive desktop software licenses. Whether you are a student organizing research papers, a professional preparing business reports, or a freelancer managing client deliverables, these tools provide enterprise-level functionality at zero cost. The convenience of accessing these tools from any device with a web browser cannot be overstated.

Frequently Asked Questions

Does merging PDFs on Linux require root/sudo permissions?

No. Neither browser-based tools nor command-line utilities like pdftk or pdfunite require root permissions for normal merging. You only need sudo when installing the packages themselves with apt or dnf. Once installed, you can run merge commands as a regular user. This makes them safe to use in scripts that run as restricted service accounts in server environments.

Can I merge password-protected PDFs on Linux?

Yes, but you need to provide the password. pdftk supports this with the `input_pw` option: `pdftk file1.pdf input_pw yourpassword cat output merged.pdf`. Alternatively, remove the password first using qpdf (`qpdf --decrypt --password=yourpassword input.pdf unlocked.pdf`), then merge the unlocked files normally. Browser-based tools like LazyPDF can also handle unlocking before merging in a two-step process.

Will merging PDFs on Linux preserve hyperlinks and bookmarks?

It depends on the tool. pdftk generally preserves hyperlinks and page bookmarks from the source documents. pdfunite is more basic and may drop interactive elements and bookmarks. If preserving document structure is critical — for example when combining chapters of a technical manual — test with pdftk first and verify the output with a PDF viewer like Evince or Okular before finalizing.

Need to merge PDFs on Linux without installing anything? LazyPDF's free online merger works in any Linux browser instantly.

Merge PDFs Online

Related Articles