{# canonical_base is the OWNING tenant's origin: all 16 Peasy domains serve the same catalogue, so a page rendered by a non-owner points its canonical at the owner instead of competing with it. Falls back to this site for static/self-owned pages. #}
🍋
Menu
PDF

Form Field

表单字段(PDF交互元素)

嵌入在PDF中的交互式控件,允许用户在文档中直接输入数据。表单字段包括文本框、复选框、单选按钮、下拉菜单、签名域和按钮。

技术细节

PDF表单字段在文档目录的AcroForm字典中定义。每个字段有类型(/Tx文本、/Btn按钮、/Ch选择、/Sig签名)、名称、默认值和外观流。XFAXML Forms Architecture)是Adobe的替代方案,但已被PDF 2.0弃用。

示例

```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();
```

相关格式

相关工具

相关术语