Skip to content
DemoSampleAPI ReferenceFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub
Android Guides Toolbar

Top Toolbar ​

ToolbarConfig controls the document interface toolbar's show/hide state, button layout, and More menu items configuration.

Toolbar Visibility ​

You can independently control the visibility of each mode's toolbar:

json
{
  "toolbarConfig": {
    "mainToolbarVisible": true,
    "annotationToolbarVisible": true,
    "contentEditorToolbarVisible": true,
    "formToolbarVisible": true,
    "signatureToolbarVisible": true
  }
}
FieldDescription
mainToolbarVisibleTop main toolbar
annotationToolbarVisibleAnnotation mode bottom toolbar
contentEditorToolbarVisibleContent editor mode bottom toolbar
formToolbarVisibleForm mode bottom toolbar
signatureToolbarVisibleSignature mode bottom toolbar

Toolbar Button Configuration ​

Left & Right Buttons ​

toolbarLeftItems and toolbarRightItems control the buttons on the left and right sides of the top toolbar respectively:

json
{
  "toolbarConfig": {
    "toolbarLeftItems": [],
    "toolbarRightItems": [
      "thumbnail",
      "search",
      "bota",
      "menu"
    ]
  }
}

Available button values:

ValueDescription
backBack button
thumbnailThumbnails
searchSearch
botaBOTA panel (outline/bookmarks/annotation list)
menuMore menu

More Menu Items ​

availableMenus controls the menu list shown when the More button is clicked:

json
{
  "toolbarConfig": {
    "availableMenus": [
      "viewSettings",
      "documentEditor",
      "documentInfo",
      "save",
      "watermark",
      "security",
      "flattened",
      "share",
      "openDocument",
      "snip"
    ]
  }
}
ValueDescription
viewSettingsView settings
documentEditorPage editor
documentInfoDocument info
saveSave
watermarkWatermark
securitySecurity/encryption
flattenedFlatten
shareShare
openDocumentOpen document
snipScreenshot

You can hide unwanted menu items or adjust the display order by modifying the items and their order in the array.

Ink Toggle Button ​

json
{
  "toolbarConfig": {
    "showInkToggleButton": true
  }
}
FieldDescription
showInkToggleButtonWhether to show the pen/eraser toggle button in annotation mode

Full Example ​

Keep only thumbnail and search buttons, show only save and share in the menu:

json
{
  "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.