Merge PDF
Operator: Abdulla Al Fahad. How tools are built and checked
Merge PDF builds one new document from the pages of up to 50 PDF files. Every page of the first file in your list comes first, followed by every page of the second, and so on, so the order you see on screen is the page order in the result. Pages are copied with their content, fonts, images and annotations exactly as they were: a landscape page stays landscape, an A4 scan next to a Letter invoice keeps its own size, and a page that was rotated in its source keeps that rotation.
The whole operation happens inside your browser with the pdf-lib library, and nothing is sent anywhere, which matters when the files are contracts, medical records or bank statements. Add the files, arrange them with the ▲ and ▼ buttons, click Merge PDFs, and download report-merged.pdf, named after the first file in the list. The sections below explain what is and is not carried across and what the warning about form fields means.
Key features
- Combines two to 50 PDFs, up to 50MB each and 200MB together.
- Keeps each page's size, orientation, rotation, embedded fonts, images, links and annotations, without re-rendering.
- Numbered file list with move-up, move-down and remove buttons so the page order is visible before the merge runs.
- Warns by file name when a document contains form fields that may not stay fillable.
What merging does to the files
A PDF stores its pages as a tree of page objects, each pointing at a content stream (the drawing instructions), a resources dictionary (fonts, images, colour spaces) and optional annotations such as links and form widgets. Merging creates an empty document and copies each page object into it together with everything the page references. Embedded fonts stay embedded, images are copied as they are, and nothing is re-rendered or recompressed, so text remains selectable and the visual quality is unchanged.
Document-level structures are not part of any page, so they do not travel. Bookmarks (the outline panel in a PDF reader) are left behind, as are the author, subject and keywords of every input. The interactive form definition, the AcroForm dictionary, is not copied either: when a file contains form fields, the widgets are copied as flat drawings and a warning names the file, because the fields may no longer be fillable. The result's title is set from the first file's name, and the output is written in the compact object-stream layout that current readers all support.
A PDF that needs a password to open is refused with a pointer to Unlock PDF, because its pages cannot be read without the key. A PDF that opens freely but restricts printing or copying is accepted; its pages are copied like any other and the merged file is saved without the restriction, since the encryption dictionary belongs to the source document rather than to its pages. A warning names each file that arrived with restrictions.
How it works
When you click Merge PDFs, the list is checked against the limits: at least two files, at most 50, and a combined size under 200MB. Each file is then read into memory, checked for the %PDF header and a size under 50MB, and parsed by pdf-lib with an empty password, which is what opens restricted-but-not-locked documents. If a file carries an AcroForm entry in its catalogue, a warning is queued for the result panel.
The pages of each parsed document are copied in order into a fresh document created for the result. Copying walks the object graph behind each page, so fonts and images shared by several pages are carried once per source file. The new document gets the first file's name as its title and is serialised with object streams; the bytes become the download, the first page is rendered for the preview, and the counts in the summary come from the parsed documents.
Common use cases
- Combining a signed cover letter, a CV and a portfolio PDF into a single application file in the order an employer expects.
- Joining the monthly statements a bank exports as twelve separate PDFs into one document for an accountant or a mortgage application.
- Stitching scanned pages that arrived as individual PDFs from a phone scanner into one bundle without re-scanning.
- Putting an invoice and its supporting receipts into one PDF so a bookkeeping system attaches a single file to the transaction.
How to use this tool
- Add the PDFs, all at once from the file picker or one by one, by dropping them on the upload area; once the first is in, the area reads Drop more files here or click to add.
- Put them in reading order with the ▲ and ▼ buttons, and remove a stray file with ✕. Whatever sits at position 1 supplies the first pages and the result's file name.
- Click Merge PDFs. Read any form-field warning, and compare the pages in and pages out chips with what you expected.
- The result header names the file, cover-letter-merged.pdf in the example below; Download .pdf saves it.
Example
Files in list order
1. cover-letter.pdf 1 page
2. cv.pdf 2 pages
3. portfolio.pdf 5 pages (page 3 is landscape)Merged result
cover-letter-merged.pdf — 8 pages
Page 1 ← cover-letter.pdf
Pages 2–3 ← cv.pdf
Pages 4–8 ← portfolio.pdf (page 6 still landscape)
Summary: 3 files in · 8 pages in · 8 pages outTips for best results
- Add the files in roughly the right order and fix the rest with ▲ and ▼; the numbers in the list are the positions in the merged file.
- The order files arrive in from the file picker follows your operating system, so naming them 01-cover.pdf, 02-cv.pdf before choosing them saves rearranging.
- Compare the pages in and pages out chips with the sum of your files' page counts; a file with fewer pages than you expected shows up as a smaller total.
- If a warning mentions form fields, fill the form in its original file and flatten or print it to PDF before merging, so the answers are fixed in the drawing rather than in fields that may stop working.
Common pitfalls
Bookmarks are not merged. A manual with a navigation panel loses it when combined, and the result has no outline at all.
The page order is exactly the list order. A file added last ends up at the end even if its name sorts first, so look at the numbered list before clicking Merge PDFs.
Mixed page sizes are kept as they are. Pages from an A4 file and a Letter file alternate in size in the result and a reader's fit-page view jumps between them; resizing would change the documents, so it is not done.
One password-protected input stops the whole run. A single locked file among ten produces the Unlock PDF message and no output until that file is unlocked or removed from the list.
Common errors and how to fix them
- Add at least two PDF files to merge.
- You clicked Merge PDFs with one file or none in the list. Add a second PDF; a single file has nothing to be joined to. If you only want to reorder or remove pages inside one document, use Delete PDF Pages or Split PDF instead.
- Merge PDF takes up to 50 files at a time.
- The list has more than 50 entries. Remove some with ✕, merge the first 50, then merge that result with the remainder; the output of one run is an ordinary PDF that can be added to the next.
- The files add up to more than 200MB. Remove some and try again.
- The combined size of everything in the list exceeds the per-run limit, even though each file may be under 50MB. Merge in batches, or re-export heavy scans at a lower resolution before adding them.
- This PDF is password-protected. Open it with Unlock PDF first, then try again.
- One file in the list is locked. Unlock it with its password in Unlock PDF, swap the unlocked copy into the list, and click Merge PDFs again; the other files need no change.
Best practices
- Merge final versions only. Because form fields and bookmarks are not carried across, finish editing and filling in the source files first, then combine them once.
- Keep the source files: the merged PDF carries none of their authors, subjects, keywords or bookmarks, so those cannot be recovered from it later.
- Put the file whose name should label the result in position 1, since the download is called <that name>-merged.pdf and the title inside the PDF is set the same way.
What to expect from the file size
The size chip shows the inputs added together and the result. In a test with two small files of 2,796 and 4,169 bytes, the merged file came to 6,276 bytes, a little under the 6,965-byte sum, because the object-stream layout packs the structural objects more tightly. For real documents expect roughly the sum of the parts: nothing is recompressed, so a bundle of scans is as heavy as the scans were, and merging is never a way to make files smaller.
Fonts and images are copied once per source file, not once per result. Two reports that each embed the same typeface contribute two copies of it, because the tool has no way to know that the two embedded programs are the same font, and a logo that appears in every input is stored once for each. Resources shared inside a single file are not duplicated, since all of that file's pages are copied in one pass. Below the 200MB per-run ceiling, the only lever on the total is to shrink the heaviest inputs before adding them.
Frequently asked questions
Can I merge only some pages of a file?
Not in one step; whole files are joined. Cut the pages you want out of the file with Split PDF (Extract a page range into one PDF), then add that extract to the list here in the position you want.
Can scanned PDFs and text PDFs go in the same merge?
Yes. Each page is copied with its own content, so image-only scan pages and text pages sit side by side. Text search and selection work on the text pages only, exactly as in the source files.
Does it matter which program made the files?
No. A page carries its own fonts, images and colour spaces, so files from a scanner, Word, a browser and a design tool combine without conversion. The only inputs refused are files that need a password to open.