GemBox.PdfViewer
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ViewerOptions Interface

    Namespace:
    @gembox/pdfviewer
    Assembly:
    @gembox/pdfviewer

    Represents the configuration options for the PDF viewer.

    • TypeScript
    export declare interface ViewerOptions
    Remarks

    This interface defines the various settings that can be used to customize the behavior and appearance of the PDF viewer when it's created.

    Fields

    container

    The container element where the PDF viewer will be mounted.

    • TypeScript
    container: HTMLElement | string;
    Remarks

    Can be either an HTMLElement reference or id selector as string (e.g., "#myContainer"). If the container cannot be found using the provided selector, an error will be thrown.

    initialDocument

    The initial PDF document to load when the viewer is created.

    • TypeScript
    initialDocument?: string | Uint8Array | ArrayBuffer;
    Remarks

    This is an optional property. If not provided, the viewer will be created without a loaded document. This can be:

    • A URL string pointing to a PDF file.
    • A base64 encoded string representing the PDF content.
    • A Uint8Array containing the raw PDF bytes.
    • An ArrayBuffer containing the raw PDF data.
    If the document cannot be loaded, the promise will reject with an error.

    ui

    Configuration options for the user interface components.

    • TypeScript
    ui?: UIOptions;
    Field Value
    UIOptions
    Remarks

    Allows customization of UI elements like theme, toolbar, and side panel configuration.

    features

    Configuration options for various features such as annotations, digital signing, zoom, page navigation, and search functionality.

    • TypeScript
    features?: FeaturesOptions;
    Field Value
    FeaturesOptions
    Remarks

    Controls which features are enabled and how they behave in the PDF viewer.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.