Skip to content
ToolkitHub

Merge PDF

Combine multiple PDFs into one

Guide

How PDF merging works

By Logappradeep · ServiceNow developer

Combining PDFs is one of the most common document chores: a signed contract plus its annexes, a stack of monthly invoices for an accountant, scanned receipts for an expense claim, or chapters exported separately from a word processor. Merging turns all of them into a single file that is easier to send, archive and print.

What happens when two PDFs are merged

A PDF is not a picture of a document. Internally it is a collection of numbered objects: each page is a dictionary that points to a content stream (drawing instructions such as "place this text at these coordinates in this font") plus the fonts, images and other resources that stream needs. A page tree ties the pages together in order.

The merge tool creates a new, empty PDF and copies the page objects from each source file into it, one file after another. Because the original content streams, fonts and images are copied rather than redrawn, the result is not a rasterized copy. Text stays sharp at any zoom level, remains selectable and searchable, and vector graphics keep their quality. File size is roughly the sum of the inputs, sometimes a little smaller because the output is saved with compact object streams.

All of this runs in your browser using the pdf-lib library. The files are read from your disk into memory, merged on your device and offered back as a download, so a confidential contract never passes through a third-party server.

Typical uses

  • Assembling an application packet: cover letter, resume, certificates and references.
  • Combining scanned pages that a scanner saved as separate files.
  • Bundling invoices or bank statements for a quarter into one archive file.
  • Joining a report with its appendices before sharing it for review.

Tips for a clean result

  1. Name files with numbers first (01-cover.pdf, 02-report.pdf). The Sort by name action uses natural ordering, so "2" comes before "10".
  2. Check page counts in the file list before merging. A file with an unexpected count is often the wrong version.
  3. Trim first, merge second. Remove blank or unwanted pages from each source with the Remove Pages tool so the merged file is tidy.

What does not carry over

Merging copies pages, not whole-document features. Bookmarks (the outline panel), document-level JavaScript, embedded file attachments and the original title metadata belong to each source document rather than to its pages, so they are not transferred. Interactive form fields can also behave unpredictably when two files use fields with the same name; if you need the filled values, flatten or print the form to PDF before merging. Digital signatures are invalidated by any change to a signed file, merging included, so merge first and sign the final document afterward.

Encrypted PDFs cannot be read without their password. If a file is rejected as password-protected, open it in a reader you trust, remove the protection with the password you have, and add it again.

Frequently asked questions

Will the text in my merged PDF still be selectable?

Yes. Pages are copied with their original text, fonts and vector graphics, so nothing is converted to an image.

Are my PDFs uploaded to a server?

No. The files are read and combined locally in your browser, and the merged document is created on your device.

Why are my bookmarks missing after merging?

Bookmarks are stored at the document level, not on individual pages, so they are not copied into the new file. You can add new bookmarks in a desktop PDF editor if you need them.

How many files or pages can I merge?

There is no fixed limit; it depends on your device's memory. Very large scans with hundreds of megabytes may be slow on phones, so merge them in smaller batches if needed.

Can I merge password-protected PDFs?

Not directly. Remove the password in a PDF reader first, then add the unlocked file to the list.