pdflib-impl-form-filling

Fill PDF form fields and flatten templates using pdf-lib.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Filling PDF forms manually is slow and error-prone; this Skill provides deterministic, composable guidance for loading, filling, and flattening forms with pdf-lib, including proper font handling for Unicode text.

Core Features & Use Cases

  • Load a PDF and get the form; enumerate fields to avoid guessing names.
  • Fill text, checkboxes, radio groups, and dropdowns; update appearances to ensure correct rendering.
  • Flatten or save as editable templates; include Unicode/font considerations for non-Latin text.

Quick Start

Fill a PDF form using pdf-lib and ensure field appearances are updated after setting values.

Frequently Asked Questions about pdflib-impl-form-filling

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

FAQPage Schema
How do I automate filling PDF form fields with JavaScript?

Automating PDF form filling with JavaScript involves loading an existing template, enumerating field names, and programmatically populating text fields, checkboxes, radios, and dropdowns using pdf-lib. You must update field appearances after setting values to ensure correct rendering.

How do I fill Unicode text in a PDF form using pdf-lib?

Filling Unicode text in a PDF form using pdf-lib requires embedding custom Unicode fonts into the document. Standard fonts do not support non-Latin characters, so you must load and register a Unicode-compatible font file before populating your text fields.

Why are my filled PDF form fields not displaying values correctly?

Filled PDF form fields may not display values correctly if field appearances are not updated after setting values. When populating text fields or checkboxes with pdf-lib, you must explicitly trigger an appearance update to ensure the viewer renders the changes.

What is the best way to enumerate PDF form field names before filling them?

Enumerating PDF form field names before filling them prevents guessing and mapping data incorrectly. The best approach is to load the PDF, access the form structure, and list all field names to create an accurate data map for text fields, checkboxes, and radios.

Can I flatten a PDF form after filling it with pdf-lib?

You can flatten a PDF form after filling it with pdf-lib to lock the entered values permanently. Flattening converts the populated text fields, checkboxes, and dropdowns into static content, or you can save the document as an editable template without flattening.

Does pdf-lib support dropdowns and radio buttons in PDF forms?

pdf-lib supports filling dropdowns and radio buttons in PDF forms alongside standard text fields and checkboxes. You can programmatically select options and update their appearances to ensure deterministic rendering across different PDF viewers.