DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › browser development

Merge PDFs in the Browser with pdf-lib: What Copies—and What to Check

By Freedom251 Team · · 3 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

pdf-lib can run in a browser and copy pages from one PDF into another. But a successful page merge is not proof that every document-level feature came along. Its documentation does not provide a complete preservation guarantee for forms, annotations, bookmarks, attachments, metadata, or signatures. If any of those matter, inspect the merged file in the software and workflow that will use it.

How browser-based merging works

The usual pdf-lib approach is to load the source PDFs, create a destination document, copy the required pages in the desired order, add those pages to the destination, and save the resulting bytes. The project lists browser support and page copying as features; the PDFDocument API describes copyPages(srcDoc, indices) as copying pages from a source document into the destination.

As an Amazon Associate I earn from qualifying purchases.

This is a page-copying operation. The documentation establishes that pages can be copied; it does not give an exhaustive guarantee that every structure associated with the source documents will be preserved in every merge.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “silently drops” means—and what is actually established

There is no documented, universal list of features pdf-lib always drops when pages are copied. The precise answer is that page copying is documented, while preservation behavior for several related features is not exhaustively specified in the reviewed API documentation. Treat those features as things to test, not as confirmed losses in every file.

#1 Best Overall
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images
  • Forms: pdf-lib exposes form APIs, but the available documentation does not establish a preservation guarantee for every AcroForm when copying pages. XFA forms are explicitly unsupported for creation, modification, or reading, as stated in the PDFForm API.
  • Annotations and links: These can affect comments, clickable links, and actions. The reviewed page-copying documentation does not provide a comprehensive guarantee for their behavior after a merge.
  • Bookmarks and navigation: Check outlines and other navigation aids in the output; their preservation is not exhaustively specified by the page-copying API.
  • Attachments and metadata: The API exposes separate methods for adding attachments and reading or setting common metadata. Those APIs do not, by themselves, establish that source attachments or metadata automatically transfer during page copying. See the PDFDocument API.
  • Signatures: Do not assume a source signature remains valid after the document is rewritten. Validate signatures in the output and plan for re-signing if the receiving workflow requires it.

Important limits beyond merging

The pdf-lib project says it cannot extract ordinary page text outside form fields and does not provide APIs to remove or edit ordinary page text. That matters if a merge is part of a broader workflow that also expects text extraction or editing; copying pages should not be mistaken for those capabilities. The project describes its supported environments and limitations in its repository and README.

XFA is a more specific limitation: pdf-lib’s form API explicitly says XFA forms are unsupported for creation, modification, or reading. If a source PDF depends on XFA, do not rely on a merged result for continued form functionality without testing it in the intended reader.

Rank #2
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner | For Computers including PC and Mac Receipt and Document Scanner USB Powered
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

How to validate a merged PDF

  1. List what must survive. Identify interactive fields, annotations, links, bookmarks, attachments, metadata, signatures, or accessibility-related structure that the recipient needs.
  2. Merge a representative copy. Include pages and features like those in the real input files; a basic visual check of a simple PDF cannot validate a complex one.
  3. Open the output in the recipient’s PDF reader. Check that pages render and appear in the intended order.
  4. Exercise interactive content. Enter form values, follow links, inspect annotations, and use bookmarks or navigation controls where relevant.
  5. Check document properties and signature status. Confirm required metadata and attachments, and validate signatures using the recipient’s normal process.
  6. Verify compliance-sensitive output independently. If accessibility, filing, or signing requirements apply, use the relevant validation process rather than treating a successful save as proof of compliance.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to investigate another PDF tool

If importing annotations, form fields and actions, document or page actions, encrypted documents, tagged PDF structure, or optional-content layers is a hard requirement, compare tools against those exact needs. PDFlib 11’s vendor feature list names import support for these categories, making it an option to investigate—not proof that every feature survives every input or that it fits every browser deployment. Check its PDF import feature list, then validate the specific files, licensing, and deployment requirements for your project.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
ScanSnap iX1300 Wireless or USB Double-Sided Color Document Scanner, Black
  • FITS SMALL SPACES AND STAYS OUT OF THE WAY. Innovative space-saving design to free up desk space, even when it's being used
  • SCAN DOCUMENTS, PHOTOS, CARDS, AND MORE. Handles most document types, including thick items and plastic cards. Exclusive QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • GREAT IMAGES EVERY TIME, NO EXPERIENCE REQUIRED. A single touch starts fast, up to 30ppm duplex scanning with automatic de-skew, color optimization, and blank page removal for outstanding results without driver setup
  • SCAN WHERE YOU WANT, WHEN YOU WANT. Connect with USB or Wi-Fi. Send to Mac, PC, mobile devices, and cloud services. Scan to Chromebook using the mobile app. Can be used without a computer
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. ScanSnap Home all-in-one software brings together all your favorite functions. Easily manage, edit, and use scanned data from documents, receipts, business cards, photos, and more
Rank #4
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner | For Computers including PC and Mac with Auto Document Feeder and Image Adjustment Tools
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning
Rank #3
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

browser developmentJavaScriptPDFpdf-libWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.