pdflib-agents-project-scaffolder

Scaffold pdf-lib projects with TypeScript configuration and fontkit registration.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents incomplete or incorrect pdf-lib setups by providing ready-made, version-aware templates and clear configuration rules so projects start with correct TypeScript settings, dependency installation, font registration, and import patterns. It removes guesswork around fontkit usage, async/await requirements, CDN pinning for browser builds, and platform-specific file output methods.

Core Features & Use Cases

  • Provides Node.js and browser project templates with complete package.json and tsconfig.json tailored for pdf-lib.
  • Offers boilerplate for common tasks: PDF generation, custom font embedding, form filling, merging/splitting, and safe file output patterns.
  • Enforces critical rules and anti-patterns: register fontkit before embedding custom fonts, always await async pdf-lib operations, use copyPages() for cross-document transfers, and pin CDN versions for production.
  • Use case: Quickly scaffold a TypeScript Node.js service that generates PDFs with embedded Unicode fonts and automated form-filling.

Quick Start

Create a new pdf-lib TypeScript project scaffold with proper tsconfig, pdf-lib dependency, and optional fontkit registration for Unicode fonts.

Frequently Asked Questions about pdflib-agents-project-scaffolder

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

FAQPage Schema
How do I set up a TypeScript project for pdf-lib with custom fonts?

To set up a TypeScript project for pdf-lib, configure the compiler to target ES2020 with esModuleInterop enabled, add pdf-lib to dependencies, and register @pdf-lib/fontkit before calling embedFont() for custom Unicode fonts.

Why does pdf-lib font embedding fail in Node.js?

pdf-lib font embedding fails in Node.js if @pdf-lib/fontkit is not registered before calling embedFont(), or if async pdf-lib operations are not properly wrapped with await, which are enforced by correct project scaffolding.

What's the best way to scaffold a browser-based pdf-lib project?

The best way to scaffold a browser-based pdf-lib project is using templates that enforce pinned CDN versions for production builds and provide platform-specific boilerplate for safe PDF generation and output.

Does pdf-lib require async/await for PDF generation and merging tasks?

Yes, pdf-lib requires async/await for PDF generation and merging tasks because operations like embedFont() and copyPages() are asynchronous, so production-ready scaffolds enforce correct async/await usage to prevent runtime errors.

How do I fill PDF forms and merge documents using pdf-lib?

You fill PDF forms and merge documents using pdf-lib by leveraging provided boilerplate that enforces using copyPages() for cross-document transfers and applying platform-specific file output patterns for safe execution.

Can I add pdf-lib to an existing JavaScript repository?

Yes, you can add pdf-lib to an existing JavaScript repository by applying scaffolding rules that ensure correct dependency installation, TypeScript configuration targeting ES2020, and proper import patterns for generation tasks.