Vertex Viewer SDK
    Preparing search index...

    Interface VertexDocumentViewer

    interface VertexDocumentViewer {
        config?: Config;
        documentId?: string;
        documentState?: DocumentApiState;
        interactionMode?: InteractionMode;
        layers?: DocumentLayersController;
        onDocumentReady?: (event: VertexDocumentViewerCustomEvent<void>) => void;
        onDocumentStateChanged?: (
            event: VertexDocumentViewerCustomEvent<DocumentApiState>,
        ) => void;
        onPageDrawn?: (
            event: VertexDocumentViewerCustomEvent<DocumentApiState>,
        ) => void;
        onPageLoaded?: (
            event: VertexDocumentViewerCustomEvent<DocumentApiState>,
        ) => void;
        provider?: DocumentProvider;
        resizeDebounce?: number;
        src?: string;
    }
    Index
    config?: Config

    Configuration values for the document viewer. See Config for more information on the available configuration options.

    documentId?: string

    The ID of the loaded Document. This ID is required to enable persistence of annotations. Note that this is different than a File ID within the Vertex Platform, and must be created separately using the /documents endpoints. See https://docs.vertex3d.com/ for more details.

    documentState?: DocumentApiState

    Common state of the current document. This value includes information common to all types of documents, including state like zoom percentage, viewport definition, and offsets.

    interactionMode?: InteractionMode

    The interaction mode for the viewer. When set to 'pan', click and drag will pan the document. When set to 'none', no pointer interactions are registered.

    'pan'
    

    Controller for interacting with layers in the currently loaded document. This controller will automatically be created along with the loaded document. Note that the methods available on this controller will only be supported if the underlying document type supports layers.

    onDocumentReady?: (event: VertexDocumentViewerCustomEvent<void>) => void

    Emits an event when the document is ready to be interacted with.

    onDocumentStateChanged?: (
        event: VertexDocumentViewerCustomEvent<DocumentApiState>,
    ) => void

    Emits an event when the document state changes.

    onPageDrawn?: (event: VertexDocumentViewerCustomEvent<DocumentApiState>) => void

    Emits an event when a page has been drawn to the canvas.

    onPageLoaded?: (
        event: VertexDocumentViewerCustomEvent<DocumentApiState>,
    ) => void

    Emits an event when a page has been loaded or reloaded prior to being drawn to the canvas.

    provider?: DocumentProvider

    The provider used to create the document API and renderer.

    new PdfJsProvider()
    
    resizeDebounce?: number

    An optional value that will debounce image updates when resizing this viewer element.

    100
    
    src?: string

    A URI of the document to load when the component is mounted in the DOM tree. Currently only supports URLs for client-side rendering.