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.
ToolbarConfig controls the document interface toolbar's show/hide state, button layout, and More menu items configuration.
You can independently control the visibility of each mode's toolbar:
{
"toolbarConfig": {
"mainToolbarVisible": true,
"annotationToolbarVisible": true,
"contentEditorToolbarVisible": true,
"formToolbarVisible": true,
"signatureToolbarVisible": true
}
}| Field | Description |
|---|---|
mainToolbarVisible | Top main toolbar |
annotationToolbarVisible | Annotation mode bottom toolbar |
contentEditorToolbarVisible | Content editor mode bottom toolbar |
formToolbarVisible | Form mode bottom toolbar |
signatureToolbarVisible | Signature mode bottom toolbar |
toolbarLeftItems and toolbarRightItems control the buttons on the left and right sides of the top toolbar respectively:
{
"toolbarConfig": {
"toolbarLeftItems": [],
"toolbarRightItems": [
"thumbnail",
"search",
"bota",
"menu"
]
}
}Available button values:
| Value | Description |
|---|---|
back | Back button |
thumbnail | Thumbnails |
search | Search |
bota | BOTA panel (outline/bookmarks/annotation list) |
menu | More menu |
availableMenus controls the menu list shown when the More button is clicked:
{
"toolbarConfig": {
"availableMenus": [
"viewSettings",
"documentEditor",
"documentInfo",
"save",
"watermark",
"security",
"flattened",
"share",
"openDocument",
"snip"
]
}
}| Value | Description |
|---|---|
viewSettings | View settings |
documentEditor | Page editor |
documentInfo | Document info |
save | Save |
watermark | Watermark |
security | Security/encryption |
flattened | Flatten |
share | Share |
openDocument | Open document |
snip | Screenshot |
You can hide unwanted menu items or adjust the display order by modifying the items and their order in the array.
{
"toolbarConfig": {
"showInkToggleButton": true
}
}| Field | Description |
|---|---|
showInkToggleButton | Whether to show the pen/eraser toggle button in annotation mode |
Keep only thumbnail and search buttons, show only save and share in the menu:
{
"toolbarConfig": {
"mainToolbarVisible": true,
"annotationToolbarVisible": true,
"contentEditorToolbarVisible": false,
"formToolbarVisible": false,
"signatureToolbarVisible": false,
"toolbarLeftItems": ["back"],
"toolbarRightItems": ["thumbnail", "search", "menu"],
"availableMenus": ["save", "share"]
}
}To add custom buttons (modify icons/text or add entirely new feature buttons), see Custom Toolbar Items.