PDF Portfolio
PDF Portfolio Package
A PDF container that bundles multiple files of different formats into a single organized PDF document.
Chi tiết kỹ thuật
PDF PDF Portfolios 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.
Ví dụ
```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();
```