DS Server

Javascript: TXDocumentViewer.init Method

Method

Description

Initializes a controller through the legacy browser-global API. The method creates a DocumentViewerController for the supplied container. If `viewerSettings.documentData` is provided, the document is loaded during initialization. The global then references the same controller instance and keeps this method available as `TXDocumentViewer.init()`. The controller's public API can subsequently be accessed directly through `TXDocumentViewer`.

Syntax

<Promise.<DocumentViewerController>> TXDocumentViewer.init(<ViewerInitSettings> initSettings, [<boolean> fireDocumentViewerLoadedEvent])

Parameters

ParameterDescription
initSettings

Container and initial viewer settings.

fireDocumentViewerLoadedEvent

Optional. Whether to dispatch the `documentViewerLoaded` event after initialization.

Return Value

The initialized document viewer controller.