Skip to main content
Version: Version 5 beta

Interface: Document

Groups all the API actions related to document handling.

Properties

annotations

annotations: DocumentAnnotationsInterface

Groups all the API actions related to annotations.


download()

download: (fileName, options?) => Promise<void>

Downloads the current document.

Parameters

fileName: string

The name of the file to be downloaded (default is ‘download.pdf’).

options?: DocumentSaveOptions

Document save options

Returns

Promise<void>

A promise that resolves when the document is downloaded.

Example

await viewer.document.download();


save()

save: (options?) => Promise<Blob>

Saves the current document.

Parameters

options?: DocumentSaveOptions

Document save options

Returns

Promise<Blob>

A promise that resolves to a Blob representing the saved document.

Example

await viewer.document.save();


tools

tools: DocumentToolsInterface

Groups all the API actions related to document tools.