ComPDF React Native - v3.0.0
    Preparing search index...

    Interface CPDFToolbarConfig

    Configuration for the top toolbar and bottom toolbars in different modes.

    interface CPDFToolbarConfig {
        mainToolbarVisible?: boolean;
        mainToolbarTitleVisible?: boolean;
        annotationToolbarVisible?: boolean;
        contentEditorToolbarVisible?: boolean;
        formToolbarVisible?: boolean;
        signatureToolbarVisible?: boolean;
        showInkToggleButton?: boolean;
        toolbarLeftItems?: CPDFToolbarAction[];
        toolbarRightItems?: CPDFToolbarAction[];
        availableMenus?: CPDFToolbarAction[];
        customToolbarLeftItems?: CPDFToolbarItem[];
        customToolbarRightItems?: CPDFToolbarItem[];
        customMoreMenuItems?: CPDFToolbarItem[];
    }
    Index

    Properties

    mainToolbarVisible?: boolean

    Set whether to display the top toolbar

    Default: true

    mainToolbarTitleVisible?: boolean

    Set whether to display the top toolbar mode-switch title and entry.

    Default: true

    annotationToolbarVisible?: boolean

    Set whether to display the annotation toolbar

    contentEditorToolbarVisible?: boolean

    Set whether to display the content editor toolbar

    formToolbarVisible?: boolean

    Set whether to display the form toolbar

    signatureToolbarVisible?: boolean

    Set whether to display the signature toolbar

    showInkToggleButton?: boolean

    Set whether to show the Ink annotation toggle button in the annotation toolbar

    toolbarLeftItems?: CPDFToolbarAction[]

    Top 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.

    toolbarRightItems?: CPDFToolbarAction[]

    Top 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.

    availableMenus?: CPDFToolbarAction[]

    Configure the menu options opened in the top toolbar CPDFToolbarAction.MENU

    if set customMoreMenuItems, the default menu items will be ignored.

    customToolbarLeftItems?: CPDFToolbarItem[]

    Custom 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
    }
    }}
    />
    customToolbarRightItems?: CPDFToolbarItem[]

    Custom 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
    }
    }}
    />
    customMoreMenuItems?: CPDFToolbarItem[]

    Custom 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"
    }
    ]
    }