PDF merging/splitting/page extraction tool (fully local operation) | ZeroTools

This tool allows you to merge multiple PDFs in file order or extract specified pages into a single PDF in the exact sequence you enter. It does not feature thumbnail-based drag-and-drop page editing, automatic splitting into multiple files, or file compression.

Loading tool interface...

Local Processing and Privacy Notice

All PDF merging and page extraction processes occur entirely within client browser memory. Selected files are neither uploaded nor stored externally. Network asset delivery, site analytics, and advertising scripts operate independently.

PDF Merge and Page Extraction

Merge two PDF files into one and extract specific pages using two single-page samples.

PDF Merge and Page Extraction

Sample Input Data

A.pdf · B.pdf / 1 page

Configuration Settings

Merge order: Document B followed by Document A (loaded together via the sample button). Extraction target: page 2.

Step-by-Step Instructions

  1. Open the 'PDF Merge' tab and click 'Load PDF Sample (B then A)' to load Document B and Document A in sequence with a single click.
  2. Click the merge button and download the resulting 2-page merged PDF file.
  3. Switch to the 'Extract Pages' tab and load the 2-page merged PDF you just downloaded.
  4. Enter '2' in the page selection field to target Document A.
  5. Click the extract button and download the resulting single-page PDF file.

Processing Results

Merging single-page documents B and A produced a 2-page PDF in B-then-A order, and extracting page 2 yielded a clean 1-page document containing Document A. Because the source PDFs are simple alphanumeric documents, advanced features such as interactive forms, digital signatures, and encryption were not present in this sample and were outside the scope of confirmation.

merged-B-A-1
merged-B-A-1
merged-B-A-2
merged-B-A-2
extracted-A-1
extracted-A-1

Operational Caveats and Boundaries

Password-protected or damaged PDFs are not supported. While thumbnail dragging and automatic batch splitting are not available, you can reorder pages by entering custom page sequences (such as '2,1') in the 'Extract Pages' tool.

Troubleshooting and Retry Steps

Always keep your original PDF files safe. If page ordering looks incorrect, check the page numbers in an external viewer and re-run the extraction with the corrected page number. Password-protected or damaged files cannot be processed.

ZeroTools: Browser Processing & Privacy

ZeroTools focuses on tools that process input on your device. Check each tool’s scope and limitations before use.

Processing and privacy policy
Chapter 1

File-Level PDF Merging

This section explains the internal process of combining multiple PDF files using pdf-lib. Multiple PDF files selected by the user are loaded into browser memory via File.prototype.arrayBuffer(), where PDFDocument.load parses each file into an independent PDF document object.

Next, a new empty PDF container document is initialized using PDFDocument.create(), and copyPages is invoked sequentially across the uploaded files in their listed order.

This merge functionality operates as a file-level concatenation. The user interface allows reordering files via Up/Down buttons or removing files from the queue, but it does not support page-level reordering within files, page rotation, or drag-and-drop thumbnail editing.

Pages extracted from each document in page order are appended to the new document instance using addPage, and pdf-lib reconstructs resource dictionaries and object trees to assemble a unified downloadable byte array.

Chapter 2

Page Extraction and Splitting Behavior

The page extraction (split) feature extracts specified pages from a large multi-page document into a single new PDF. A key functional characteristic is that this extraction workflow is limited to gathering specified pages from a single source PDF in designated order (allowing duplicates) into one output file.

Unlike specialized desktop utilities that burst a document into dozens of individual single-page files or segment ranges into multiple separate PDFs, this implementation outputs only one unified document.

The application reads the single source PDF into memory, invokes copyPages based on parsed zero-indexed page numbers, and copies the targeted pages into a newly created PDFDocument.

This process is non-destructive to the original document, omitting thumbnail generation, and does not provide dedicated PDF compression features, while advanced structures such as bookmarks or forms may not be preserved.

Chapter 3

Range Notation Parsing Algorithm

The extraction UI accepts string notation such as '1-3, 5' and parses it with a dedicated range-parsing algorithm. The input string is split by commas, and each resulting segment is evaluated.

If a segment contains a hyphen, it is treated as a range, parsing the start and end values into integer page numbers. Strict validation checks confirm that inputs are valid positive numbers, starting pages are 1 or greater, ending pages do not exceed total document page count, and start values do not exceed end values.

Valid page numbers are converted to zero-based indices and appended sequentially to the extraction queue. Individual page numbers without hyphens undergo identical boundary checks.

Duplicate numbers result in duplicate extracted pages in the output document. If invalid syntax, non-numeric characters, reversed ranges, or out-of-bound pages are detected, processing halts with an exception and returns immediate user feedback in the UI status panel.

Chapter 4

Client-Side Processing and URL Lifecycle

To eliminate server transmission, all file operations occur entirely within local browser memory. Selected PDF files are handled as File objects and converted to ArrayBuffer data in client memory.

No document binary data is transmitted or uploaded across the network to cloud servers, distinguishing local document manipulation from site network communication, though client processing does not guarantee host operating system security.

Once generated, the output document binary is obtained as a Uint8Array and wrapped in a Blob with MIME type application/pdf. A dynamic download URL is generated via URL.createObjectURL(), triggering an anchor click event to initiate browser downloading.

Temporary Blob URLs are released via URL.revokeObjectURL() inside setTimeout(..., 0) immediately after download initiation. Whether a save dialog appears or the file saves automatically depends on user browser settings.

Chapter 5

Memory Considerations for Large Files

Because this client-side architecture operates without server-side batch workers, performance and stability depend directly on device hardware (especially physical RAM) and browser heap limitations.

While the tool sets no artificial file size or page count limits, it processes documents by reading each file into memory and building the new document in memory.

Handling multi-hundred-megabyte files or documents with numerous high-resolution images can rapidly approach browser JavaScript heap thresholds.

If heap memory is exhausted, an Out of Memory error occurs, crashing the tab or freezing the interface. The tool lacks streaming mechanisms to segment large binary streams or guarantee bounded memory usage under extreme workloads.

When processing dozens of large PDFs or extensive page extractions, users should ensure adequate free memory or divide files into manageable subsets before processing.

Chapter 6

Unsupported PDF Features and Structural Limitations

Because pdf-lib performs page-copy operations to construct a new document, retention of advanced PDF structures from source files is not guaranteed.

The core process extracts content streams and associated direct resources (fonts, images, vector drawing commands) for the designated pages and rebuilds them in a newly generated document.

Document-level metadata (authors, creation dates, keywords), outline bookmarks, interactive form fields, submitted form data, embedded file attachments, and cryptographic digital signatures are not reliably inherited and are frequently omitted.

Consequently, this tool is unsuitable for strict legal or enterprise workflows requiring digital signature integrity. Furthermore, password-protected or encrypted PDFs cannot be autonomously decrypted.

While loading with ignoreEncryption: true bypasses encryption checks to read page counts in some files, this does not guarantee page count retrieval for all encrypted documents, and subsequent processing via PDFDocument.load will throw an error and abort if the file remains encrypted.

Password protection must be removed prior to processing.

Frequently Asked Questions (FAQ)

A.
Only the order of files can be adjusted on the merge screen. The internal page order within each PDF is preserved. Rotating individual pages, removing specific pages, or reordering thumbnails within a file is not supported.
A.
No. Specified pages (such as '1-3, 5') are extracted in their entered order into a single new PDF document. The tool does not split a file into multiple individual PDFs or separate files per range.
A.
Encrypted PDFs cannot be processed. Furthermore, because new documents are created by copying pages, digital signatures, bookmarks, attachments, form fields, and document-level metadata are not guaranteed to be preserved.
A.
Files are read directly into browser memory. Processing time and stability depend on page count, image resolution, and available system RAM. Keep your original files intact and verify output page counts after generation.