pdflib-impl-merging

Merge, split, and reorder PDF pages using pdf-lib copyPages() workflows.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/pdf-lib-Claude-Skill-Package --skill pdflib-impl-merging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdflib-impl-merging
Source: https://github.com/OpenAEC-Foundation/pdf-lib-Claude-Skill-Package/tree/main/skills/source/pdflib-impl/pdflib-impl-merging
Command: npx skills add https://github.com/OpenAEC-Foundation/pdf-lib-Claude-Skill-Package --skill pdflib-impl-merging

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Use when merging, splitting, or reordering PDF pages across documents with pdf-lib. Prevents the critical cross-document error: directly adding pages from another document instead of using copyPages() first, which corrupts the PDF. Covers copyPages workflow, merge patterns, page extraction, splitting, reordering.

Core Features & Use Cases

  • CopyPages workflow: Always copy pages before adding.
  • Merge, split, reorder patterns across documents.
  • Page extraction and reordering examples.

Quick Start

Describe a safe merge workflow by copying pages with copyPages() then adding them to the destination document.

Frequently Asked Questions about pdflib-impl-merging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge pages from multiple PDFs using pdf-lib in JavaScript?

Merge PDFs using pdf-lib by calling copyPages() to duplicate pages from source documents, then adding them to a destination PDFDocument to prevent cross-document corruption.

Why does copying pages directly between PDFs corrupt the document in pdf-lib?

Directly adding pages from another PDF corrupts the document because internal references break; copyPages() ensures safe cross-document page merging by properly transferring resources.

Can I split and reorder PDF pages across documents with TypeScript?

Yes, split and reorder PDF pages across documents with TypeScript by enforcing copyPages() workflows to safely extract, rearrange, and insert pages into new PDF files.

What is the best way to extract specific pages from a PDF using pdf-lib?

Extract specific pages safely by using copyPages() to copy the target pages from the source PDFDocument, then assembling them into a new or existing destination document.

Does pdf-lib support deterministic page copying for document assembly?

pdf-lib supports deterministic page copying through copyPages(), providing cross-document safety checks and reliable workflows for building document assembly tooling.

What are the limitations of merging PDFs with pdf-lib?

Limitations of merging PDFs with pdf-lib include handling complex edge cases and error scenarios during cross-document page manipulation, requiring strict adherence to copyPages() workflows.