OptionalmainSet whether to display the top toolbar
Default: true
OptionalmainSet whether to display the top toolbar mode-switch title and entry.
Default: true
OptionalannotationSet whether to display the annotation toolbar
OptionalcontentSet whether to display the content editor toolbar
OptionalformSet whether to display the form toolbar
OptionalsignatureSet whether to display the signature toolbar
OptionalshowSet whether to show the Ink annotation toggle button in the annotation toolbar
OptionaltoolbarTop toolbar actions on the left side. Android Platform Default: back iOS Platform Default: back, thumbnail
if set customToolbarLeftItems, the default left items will be ignored.
OptionaltoolbarTop toolbar actions on the right side. Android Platform Default: thumbnail, search, bota, menu iOS Platform Default: search, bota, menu
if set customToolbarRightItems, the default right items will be ignored.
OptionalavailableConfigure the menu options opened in the top toolbar CPDFToolbarAction.MENU
if set customMoreMenuItems, the default menu items will be ignored.
OptionalcustomCustom toolbar items to be added to the toolbar. These items will be added to the left sides of the top toolbar.
// Adding a custom button to the left side of the toolbar
toolbarConfig: {
customToolbarLeftItems: [
{
action: CPDFToolbarAction.CUSTOM,
identifier: "custom_button_1",
icon: "custom_icon", // name of the android drawable or iOS image asset
title: "Custom" // This only takes effect in the "more" menu.
}
]
}
// The custom button can be handled via the onToolbarItemPressed callback
<CPDFReaderView
configuration={configuration}
onToolbarItemPressed={(identifier) => {
if (identifier === "custom_button_1") {
// Handle custom button press
}
}}
/>
OptionalcustomCustom toolbar items to be added to the toolbar. These items will be added to the right sides of the top toolbar.
// Adding a custom button to the right side of the toolbar
toolbarConfig: {
customToolbarRightItems: [
{
action: CPDFToolbarAction.CUSTOM,
identifier: "custom_button_1",
icon: "custom_icon", // name of the android drawable or iOS image asset
title: "Custom" // This only takes effect in the "more" menu.
}
]
}
// The custom button can be handled via the onToolbarItemPressed callback
<CPDFReaderView
configuration={configuration}
onToolbarItemPressed={(identifier) => {
if (identifier === "custom_button_1") {
// Handle custom button press
}
}}
/>
OptionalcustomCustom toolbar items to be added to the "more" menu. These items will be added to the bottom of the "more" menu.
// Adding a custom button to the "more" menu
toolbarConfig: {
customMoreMenuItems: [
{
action: CPDFToolbarAction.CUSTOM,
identifier: "custom_button_1",
icon: "custom_icon", // name of the android drawable or iOS image asset
title: "Custom" // This only takes effect in the "more" menu.
},
{
action: CPDFToolbarAction.VIEW_SETTINGS
icon: "view_settings_icon",
title: "View Settings"
}
]
}
Configuration for the top toolbar and bottom toolbars in different modes.