🍋
Menu
PDF

PDF

Portable Document Format

A file format developed by Adobe that preserves document formatting across platforms and devices.

Technical Detail

PDF PDFs use the AcroForm or XFA specification to define widgets that capture user input. AcroForm fields support text, checkboxes, radio buttons, dropdowns, and signature fields with built-in JavaScript validation. Each field stores its value separately from the visual appearance, allowing programmatic extraction and pre-filling. XFA (XML Forms Architecture) offers more dynamic layouts but is deprecated in PDF 2.0 in favor of AcroForm.

Example

```javascript
// Fill PDF form fields
const form = pdf.getForm();
form.getTextField('name').setText('Jane Doe');
form.getCheckBox('agree').check();
form.getDropdown('country').select('United States');

// Flatten form (make fields non-editable)
form.flatten();
```

Related Formats

Related Tools

Related Terms