PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
In form mode, a toolbar (CFormToolbar) appears at the bottom for creating and editing various form controls. FormsConfig controls the available form types, tool buttons, and behavior switches.
availableTypes controls the form type buttons shown in the toolbar:
{
"formsConfig": {
"availableTypes": [
"textField",
"checkBox",
"radioButton",
"listBox",
"comboBox",
"signaturesFields",
"pushButton"
]
}
}| Value | Description |
|---|---|
textField | Text input field |
checkBox | Check box |
radioButton | Radio button |
listBox | List box |
comboBox | Combo box (dropdown) |
signaturesFields | Signature field |
pushButton | Push button |
{
"formsConfig": {
"availableTools": [
"undo",
"redo"
]
}
}| Value | Description |
|---|---|
undo | Undo |
redo | Redo |
Controls whether to automatically show the property settings dialog after creating specific form controls (only supported for ListBox, ComboBox, and PushButton):
{
"formsConfig": {
"showCreateListBoxOptionsDialog": true,
"showCreateComboBoxOptionsDialog": true,
"showCreatePushButtonOptionsDialog": true
}
}| Field | Description |
|---|---|
showCreateListBoxOptionsDialog | Show property dialog after creating a list box |
showCreateComboBoxOptionsDialog | Show property dialog after creating a combo box |
showCreatePushButtonOptionsDialog | Show property dialog after creating a push button |
Intercept default form interaction behavior for custom handling via event callbacks (only supported for ListBox, ComboBox, and PushButton):
{
"formsConfig": {
"interceptListBoxAction": false,
"interceptComboBoxAction": false,
"interceptPushButtonAction": false
}
}| Field | Description |
|---|---|
interceptListBoxAction | Intercept list box click |
interceptComboBoxAction | Intercept combo box click |
interceptPushButtonAction | Intercept push button click |
When set to true, clicking the corresponding form control will no longer execute the default behavior. Instead, it will trigger a CPDFCustomEventCallbackHelper callback where you can implement custom logic.
CFormToolbar is the core UI component of the form toolbar, located in the com.compdfkit.tools.forms.pdfformbar package.
Related classes:
| Class | Description |
|---|---|
CFormToolbar | Form toolbar main view |
CFormToolbarAdapter | Form type list adapter |
CFormToolBean | Form tool item data model |