Files
med-notes/.pnpm-store/v10/files/c4/71ad1a8e813862664186ca870e37cca35542e04c249d8294c90442bb42e7456aaeb2a5df80adff81ae8c1a43518a52ae4c274e2e306f0afcd09dcb5ecc5db2
2025-05-09 05:30:08 +02:00

58 lines
1.8 KiB
Plaintext

export type EventBus = import("./event_utils").EventBus;
export type PDFScriptingManagerOptions = {
/**
* - The application event bus.
*/
eventBus: EventBus;
/**
* - The path and filename of the
* scripting bundle.
*/
sandboxBundleSrc?: string | undefined;
/**
* - The factory that is used when
* initializing scripting; must contain a `createScripting` method.
* PLEASE NOTE: Primarily intended for the default viewer use-case.
*/
externalServices?: Object | undefined;
/**
* - The function that is used to lookup
* the necessary document properties.
*/
docProperties?: Function | undefined;
};
/**
* @typedef {Object} PDFScriptingManagerOptions
* @property {EventBus} eventBus - The application event bus.
* @property {string} [sandboxBundleSrc] - The path and filename of the
* scripting bundle.
* @property {Object} [externalServices] - The factory that is used when
* initializing scripting; must contain a `createScripting` method.
* PLEASE NOTE: Primarily intended for the default viewer use-case.
* @property {function} [docProperties] - The function that is used to lookup
* the necessary document properties.
*/
export class PDFScriptingManager {
/**
* @param {PDFScriptingManagerOptions} options
*/
constructor({ eventBus, externalServices, docProperties }: PDFScriptingManagerOptions);
setViewer(pdfViewer: any): void;
setDocument(pdfDocument: any): Promise<void>;
dispatchWillSave(): Promise<any>;
dispatchDidSave(): Promise<any>;
dispatchWillPrint(): Promise<void>;
dispatchDidPrint(): Promise<any>;
get destroyPromise(): any;
get ready(): boolean;
/**
* @private
*/
private get _pageOpenPending();
/**
* @private
*/
private get _visitedPages();
#private;
}