Skip to content

PDF Generation Template Editor

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

View on GitHub

Helpers, Hooks & Constants ​

This page lists the constants that instance.UI exposes, and the source folders that hold the helpers, composables and constants of the UI.

Constants on instance.UI ​

ConstantContents
UI.EventsUI event names, such as VIEWER_LOADED, THEME_CHANGED, LANGUAGE_CHANGED, TOOLBAR_GROUP_CHANGED. See Events.
UI.ToolbarGroupToolbar groups: VIEW, ANNOTATE, FORMS, MEASURE, FILL_AND_SIGN, SECURITY, REDACT, COMPARE, EDIT_TEXT, DOCUMENT, …
UI.PanelsPanel names, such as THUMBNAIL (thumbnailsPanel), NOTES (notesPanel), TABS (tabPanel).
UI.FeatureFeature names for enableFeatures / disableFeatures, such as Annotations, Print, Download, Measurement, Redaction.
UI.LayoutMode / UI.FitModeValues for setLayoutMode / setFitMode.
UI.ThemeTheme names for setTheme.
UI.LanguagesLanguage codes.
UI.PRESET_BUTTON_TYPESButton types for UI.Components.PresetButton.
UI.JustifyContentAlignment values for headers and grouped items.

Tool names are in instance.Core.Tools.ToolNames.

javascript
const { UI } = instance;
UI.setToolbarGroup(UI.ToolbarGroup.ANNOTATE);
UI.openElement(UI.Panels.TABS);
UI.disableFeatures([UI.Feature.Print]);
console.log(instance.Core.Tools.ToolNames.RECTANGLE);

Helpers — src/helpers/ ​

Utilities and feature flows used by the APIs and components: argument checking (checkTypes), device detection (device), popup positioning (getPopupPosition), event wiring (eventHandler, fireEvent), printing, search, page ranges, style injection, and the feature flows in helpers/flows/ (documents, tools, signatures, page editor, compare, language, fonts).

Composables — src/composables/ ​

Vue composables shared by components, such as access to the instance context and its stores (useInstanceContext) and the Core wrappers.

Constants — src/constants/ ​

  • dataElement.ts — the data-element values of built-in elements.
  • toolNames.ts — tool names used by the UI.
  • panel.ts — panel names (UI.Panels).
  • toolbarGroup.ts — toolbar groups (UI.ToolbarGroup).
  • events.ts — UI events (UI.Events).
  • feature.ts — features (UI.Feature).
  • customizationVariables.ts — modular item types and PRESET_BUTTON_TYPES.