PDFDocumentProxy
Unofficial
Proxy for an opened PDF document.
Import:
import type { PDFDocumentProxy } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface PDFDocumentProxyProperties
| Property | Type | Description | |
|---|---|---|---|
| fingerprints | [string, null | string] | Document fingerprints. | |
| isPureXfa | boolean | Whether the document is a pure XFA form. | |
| loadingParams | PDFLoadingParams | Loading parameters used for the document. | |
| numPages | number | Total number of pages. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| cleanup(manuallyTriggered?) | Promise<void> | Cleans up resources held by the document. | |
| destroy() | Promise<void> | Destroys the document and releases resources. | |
| getAttachments() | Promise<null | Record<string, unknown>> | Gets the attachments of the document. | |
| getData() | Promise<Uint8Array> | Gets the raw document data. | |
| getDestination(id) | Promise<null | unknown[]> | Gets a named destination. | |
| getDestinations() | Promise<Record<string, unknown[]>> | Gets all named destinations. | |
| getDownloadInfo() | Promise<PDFDownloadInfo> | Gets download information for the document. | |
| getMarkInfo() | Promise<null | PDFMarkInfo> | Gets the mark information for the document. | |
| getMetadata() | Promise<PDFMetadata> | Gets the document metadata. | |
| getOpenAction() | Promise<null | object> | Gets the open action for the document. | |
| getPage(pageNumber) | Promise<PDFPageProxy> | Gets a page by its 1-based page number. | |
| getPageIndex(ref) | Promise<number> | Gets the page index for a reference object. | |
| getPageLabels() | Promise<null | string[]> | Gets the page labels. | |
| getPageLayout() | Promise<string> | Gets the page layout. | |
| getPageMode() | Promise<string> | Gets the page mode. | |
| getViewerPreferences() | Promise<null | Record<string, unknown>> | Gets the viewer preferences. | |
| saveDocument() | Promise<Uint8Array> | Saves the document. |
Links to this page: