Merging PDFs sounds like stapling: put file A in front of file B and you are done. Inside the file, it is more like moving house. Each page and everything attached to it is packed and carried into a new document. Anything that belonged to the old document as a whole, rather than to a page, stays behind unless the tool makes a special effort to bring it.
TabGarden's Merge PDF and Split PDF tools both work by copying pages into a new, empty document with the open-source library pdf-lib. To find out exactly what survives that, we built two test PDFs packed with features, merged them with the same steps the tool uses, and inspected the result with four PDF libraries and tools. This guide reports what we saw and what we could not test.
Pages versus documents
A PDF has two levels:
- Page-level things live inside each page's own record: the text and pictures drawn on it, its size and rotation, and its annotations (sticky notes, highlights, links, and the visible boxes of form fields).
- Document-level things live in the file's catalog, outside any page: the title and author, XMP metadata, the bookmark outline, page labels such as i, ii, iii, named destinations, attached files, the document language, and the form's list of fields.
Copying pages brings everything on the first list, because it is part of the page. The second list stays behind, because nothing in the page points to it.
How we tested
Source A (3 pages) was given:
- Document information: title, author, subject, keywords, creator, producer and a creation date of 2 January 2020
- An XMP metadata stream with its own title
- A bookmark outline with one entry per page, set to open with bookmarks showing
- Page labels i, ii, iii
- A named destination called
chapter3 - A document language (en-GB)
- A form with a text field
nameset to "Ada", a checked checkboxagree, and an empty, unsigned signature field - On page 2: a sticky note, a web link and a highlight
- On page 1: a link that jumps to page 3
- Page 3 rotated by 90 degrees
- An attached file,
notes.txt
Source B (2 pages) had a title, an author and its own text field, also called name, set to "Grace".
We merged A then B with exactly the calls the Merge PDF tool makes (create an empty document, copy all pages of each file, add them, save), and separately extracted pages 2 and 3 of A the way Split PDF does. The pdf-lib file used is byte-for-byte the one the site ships. We inspected every file with pdf-lib 1.17.1, pdf.js 4.10.38, pypdf 6.17.0 and poppler's pdfinfo 22.02. The scripts and the raw observations (CSV) are in the site's research/what-merging-pdfs-keeps-and-loses/ folder.
What survived
- All pages, in order. The merged file had 5 pages: A's three, then B's two.
- Page content. The text drawn on each page was there, still as text.
- Page size and rotation. Every page kept its size, and A's third page was still rotated by 90 degrees.
- Sticky notes, highlights and web links. The note and the highlight on page 2 came through with their text, and the web link kept its address. pdf.js, which lists every annotation on each page, found them on the same page as in the source.
- The visible form boxes and their values. The text boxes still showed "Ada" and "Grace", and the stored values were still attached to them. But see the next section: they are no longer a working form.
What was lost
- Title, author, subject and keywords. All empty in the merged file. Neither A's nor B's values were kept.
- Creator, producer and dates. Replaced. The merged file names pdf-lib as creator and producer, and its creation date is the moment of the merge, not 2020.
- XMP metadata. Gone. pdf.js found no XMP stream.
- Bookmarks. The outline was gone in all three tools we used to read it (pdf-lib, pdf.js and pypdf), along with the setting to open with bookmarks showing.
- Page labels. A's pages were labelled i, ii, iii in the source. The merged file has no labels, so viewers simply number the pages 1 to 5. The guide on extracting pages explains why printed and file page numbers differ.
- Named destinations.
chapter3no longer existed. Links from other documents or web pages that open the PDF at that named place would no longer find it. - Attachments.
notes.txtwas not in the merged file. - Document language. Gone. Assistive software can use it to choose the reading language, so it is worth setting again in an editor if accessibility matters.
- The form itself. pdf-lib, pdf.js, pypdf and pdfinfo all reported no form in the merged file (
pdfinfoprinted "Form: none"). The field boxes are still on the pages as annotations, but the document-level list that turns them into a fillable form was not copied. How a viewer treats such orphaned field boxes varies; we did not test interactive filling in desktop viewers. Note also that both sources had a field namedname, holding different values. A form refers to its fields by name, so a tool that rebuilt the form would have to decide what to do about the clash, for example by renaming one of them.
The surprising one: internal links
A's page 1 had a link that jumped to page 3. After merging, the link was still on page 1, but its target had changed:
- pypdf reported that the link's target was not a page of the merged document.
- pdf.js resolved it to page 1, the wrong page.
The reason is that a link stores a pointer to a specific page object. When the page with the link was copied, pdf-lib also copied the page it pointed to, as a hidden extra object that is not part of the page list. The merged file contained 8 page objects for 5 visible pages.
That hidden copy can cost space. We made a 3-page source in which every page held its own 2.0 MB photo, and added a link from page 1 to page 3. Sizes here use 1 MB = 1,048,576 bytes. Results:
- Merging the whole file: the same size with or without the link (6.0 MB). The hidden objects reused content already being copied.
- Extracting only page 1: 2.0 MB without the link, 4.0 MB with it. One extra photo's worth of data came along, although the extracted file shows a single page.
If a split or extracted file is unexpectedly large, a table of contents or "see page X" links on the extracted pages are a likely cause.
Digital signatures: what we could and could not test
We could not test a PDF with a real cryptographic signature, because we had no certificate-signed test file made with signing software. What we did test was an empty signature field. Its box was copied onto page 3 of the merged file, still empty, and like the other fields it was no longer part of any form.
What follows from that is limited but clear: the merged file is a brand-new file written by pdf-lib, the form that holds signature fields is not copied, and the original file's bytes are not reproduced. So a merged copy cannot carry over a valid signature. If a signature must stay verifiable, send the signed file as it is, and if several documents need to be signed together, merge them first and sign the merged file.
What we did not test
- Real digital signatures (see above).
- XFA forms, a separate form technology from the AcroForm fields we tested.
- Encrypted or password-protected files. The Merge PDF tool stops with an error on these, as its page explains.
- Tagged PDF structure for accessibility (reading order, headings). It is document-level, so we would expect it not to carry over, but we did not build a tagged test file.
- Optional content layers and embedded JavaScript actions.
Practical advice
- Fill and save forms before merging. The values you typed stay visible on the page, even though the merged file is no longer a fillable form. If the recipient must still fill in the form, send it separately.
- Expect to lose bookmarks. For long reports, either keep the original files, or add bookmarks again in a PDF editor after merging.
- Set the title again if it matters. Some viewers and document managers show the title field instead of the file name; the merged file has none.
- Check internal links. Click a "go to page" link or two in the merged or split file. If they land on the wrong page, the source used links to specific pages.
- Sign last. Merge, then sign.
- Annotations come along. Sticky notes, highlights and comments on the pages stay. Review them before sending a merged file to someone outside your team.
Splitting works the same way
Split PDF uses the same page copying, so everything above applies to it too. In our test, extracting pages 2 and 3 of A kept the sticky note, highlight, web link and the 90 degree rotation, and lost the metadata, bookmarks, labels, attachment and form.
Common questions
Does merging reduce quality?
No. Pages are copied, not redrawn, so images are not recompressed and text stays text. File size changes are about what is copied, as the internal link example shows. For what drives the size of scanned pages, see scan documents to PDF with phone photos.
Are my files uploaded when I merge?
Not with the TabGarden tools: the copying runs in your browser tab. The guide on online file converters and privacy explains how to check this for any site.
Can I keep bookmarks when merging?
Not with page copying alone. A tool would have to rebuild the outline and point each entry at the copied pages. TabGarden's merge does not do that today, so plan to add them again afterwards if you need them.