Namespace: UI

UI

ComPDFKit WebViewer Instance UI namespace. The namespace containing WebViewer's user interface controls and classes.

Methods


<static> disableElements(elements)

Hide navigation bar elements. Refer to Hide/Show Navigation Bar Elements for details.

Parameters:
Name Type Description
elements Array

An array of elements to disable.


<static> enableElements(elements)

Show navigation bar elements. Refer to Hide/Show Navigation Bar Elements for details.

Parameters:
Name Type Description
elements Array

An array of elements to enable.


<static> loadDocument(url)

Load new document into the WebViewer UI.

Parameters:
Name Type Description
url string | File

The URL of the document or File object to load.


<static> setActiceToolMode(groupDataElement)

Sets the current active toolbar group. Refer to UI Customization for details.

Parameters:
Name Type Description
groupDataElement string

The groups dataElement. Default values are: toolMenu-View, toolMenu-Annotation, toolMenu-Form, toolMenu-Sign, toolMenu-Security, toolMenu-Compare, toolMenu-Editor


<static> setHeaderItems(callback)

You can customize header items. Refer to UI Customization for details.

Parameters:
Name Type Description
callback function

Callback function to handler different operations on the header.


<static> setLanguage(language)

Sets the language of the WebViewer user interface.

Parameters:
Name Type Description
language zh-CN | en

The language to set the WebViewer user interface to.