How PDF merging works
A PDF is not a stream of pages but a tree of objects: a catalog points to a page tree, each page points to its content stream, fonts, images and annotations. This tool creates a new, empty document with the open-source pdf-lib library, loads each file you added, and calls copyPages to duplicate every page object, along with the fonts and images it references, into the new document. The pages are then appended in the order shown in the file list (drag the handle or use the arrows to change it) and the result is saved as merged.pdf.
Because page content is copied rather than redrawn, text stays selectable and vector graphics stay sharp. Nothing is rasterized or re-compressed.
Worked example
Say you are assembling a loan application from three files: a 2-page application.pdf (180 KB), a 5-page bank-statements.pdf (1.2 MB) and a 1-page id-scan.pdf (2.4 MB). Add them in that order and the result is one 8-page PDF of roughly 3.7 MB, because the output is close to the sum of the inputs. A font embedded in two of the files is usually copied twice rather than shared, so merging rarely makes the total smaller. Page 1 of the output is page 1 of application.pdf; page 3 is the first statement page.
What is kept and what is lost
| Item | In the merged file |
|---|---|
| Page text, images, vector art | Kept as-is |
| Page sizes and orientation | Kept per page, so mixed A4 and Letter pages stay mixed |
| Bookmarks / outline | Not carried over, since the document-level outline is not part of a page |
| Fillable form fields | May stop being editable, because form fields are registered at document level |
| Document title, author, keywords | Not carried over, since the output is a new document |
Link annotations sit on the pages themselves, but internal links that jump to a page in the original file may not point anywhere useful after merging. Treat the merged file as a flattened packet, and check it before sending if bookmarks or fillable fields matter.
Common mistakes
- Password-protected files. The merge fails with an error if any file is encrypted, and it fails for the whole batch, not just that file. Remove the password in a PDF viewer first (for example by printing to a new PDF) and try again.
- Wrong order. Pages follow the numbered list, which starts in the order you added the files. Grab the ⠿ handle and drag a file to a new position, or use the ↑ and ↓ buttons, which also work on a touch screen. Checking the numbers before you merge is quicker than fixing the page order in the merged PDF afterwards.
- Scans that are huge. A phone scan can be several MB per page. All files are held in browser memory while merging, so a dozen large scans can slow a low-memory phone. Merge in two batches, then merge the results.
- Merging images. This tool only accepts PDFs. Turn photos into a PDF first with Image to PDF, then merge.
To go the other way, Split PDF separates a document into parts, and Extract PDF Pages pulls out only the pages you need.