xwt
2025-07-04 b76e716ff4656191d73eba398e9eb39ee975e13b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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;
}