ViewerOptions Interface
Represents the configuration options for the PDF viewer.
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.
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.
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.
ui
Configuration options for the user interface components.
ui?: UIOptions;
Field Value
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.
features?: FeaturesOptions;
Field Value
Remarks
Controls which features are enabled and how they behave in the PDF viewer.