14 categories See all →
home / blog / Images

How PDF Merging Works (and When You'd Want To)

What actually happens when you combine PDFs, the mistakes people make with merge order and locked files, and real use cases.

People often describe PDF merging as "stitching images together," which is a reasonable guess but not actually what's happening. A PDF isn't a sequence of pictures — it's a structured document format, and understanding that difference explains both why merging works the way it does and why a couple of common assumptions about it are wrong.

What a PDF actually is

Internally, a PDF file is a structured document: a collection of page objects (each describing the text, images, fonts and layout for that page), plus an index — called the cross-reference table, or xref table — that tells a PDF reader where to find each of those objects inside the file and how they relate to each other. When you open a PDF and flip through its pages, the reader is walking through this structure, not playing back a sequence of embedded photos (even if, visually, some PDFs are literally just scanned photos placed one per page).

What merging actually does

Merging two or more PDFs means creating a brand-new PDF document and copying each source file's page objects into it, in order, then rebuilding a fresh xref table that correctly indexes everything. It's closer to combining the chapters of several books into one bound volume than to gluing photos onto a wall — the content from each source file lands in the new document intact, with its own internal structure (fonts, text, embedded images) preserved exactly as it was.

Our PDF Merger does exactly this using pdf-lib, an open-source library — and it runs entirely client-side, meaning the merging happens inside your own browser tab rather than on a server somewhere. Your files are never uploaded; the merge happens locally and the combined PDF is generated and downloaded straight from your browser.

Real use cases

The most common one: you've scanned several pages of a document separately — maybe your scanner app saves one PDF per page — and you want a single file to email or submit. Merging turns a folder of single-page PDFs into one properly ordered document.

Assembling a report from multiple source files is another common case — say, a cover page designed separately, a body document exported from a word processor, and an appendix exported from a spreadsheet. Each exists as its own PDF; merging combines them into the final deliverable in the right reading order.

Combining an invoice with its supporting attachments — a purchase order, a delivery note, a signed contract page — into one file is a common business case too, especially when a client or auditor expects a single document rather than four separate email attachments.

Where people get it wrong

Merge order matters, and it's easy to get backwards. The order you add files (or arrange them in the tool) is the exact order they'll appear in the final document — there's no automatic reordering by filename or date. Check the sequence before merging, especially with more than two or three files; our merger lets you reorder files up or down in the list before you hit merge, precisely because getting this wrong after the fact means starting over.

Password-protected PDFs usually need to be unlocked first. A PDF merger reads each source file's internal structure to copy its pages — if a file is encrypted or password-protected, most tools (including client-side ones using libraries like pdf-lib) can't read its contents to merge them, and you'll get an error. Remove the password (with the correct credentials) before merging, then re-protect the combined file afterward if needed.

Merging scanned-image PDFs doesn't make them searchable. If your source PDFs are just scanned pages — essentially photographs of paper, with no underlying text layer — combining them into one file doesn't add that text layer. The merged PDF is still, technically, a sequence of page-sized images; you still can't select or search the text inside it. That requires OCR (optical character recognition) as a separate step, run on the scanned pages specifically, not something merging does as a side effect.

If you're regularly dealing with scanned pages or source PDFs from different places, our PDF Merger handles the reordering and merging in a few clicks — free, no account, and nothing leaves your browser.