UNPKG

pdfjs-dist

Version:

Generic build of Mozilla's PDF.js library.

91 lines (90 loc) 3.34 kB
export type PDFPageProxy = import("./api").PDFPageProxy; export type PageViewport = import("./display_utils").PageViewport; export type IDownloadManager = any; export type IPDFLinkService = import("../../web/interfaces").IPDFLinkService; export type AnnotationElementParameters = { data: Object; layer: HTMLDivElement; page: PDFPageProxy; viewport: PageViewport; linkService: IPDFLinkService; downloadManager: any; annotationStorage?: AnnotationStorage | undefined; /** * - Path for image resources, mainly * for annotation icons. Include trailing slash. */ imageResourcesPath?: string | undefined; renderForms: boolean; svgFactory: Object; enableScripting?: boolean | undefined; hasJSActions?: boolean | undefined; fieldObjects?: Object | undefined; mouseState?: Object | undefined; }; export type AnnotationLayerParameters = { viewport: PageViewport; div: HTMLDivElement; annotations: any[]; page: PDFPageProxy; linkService: IPDFLinkService; downloadManager: any; /** * - Path for image resources, mainly * for annotation icons. Include trailing slash. */ imageResourcesPath?: string | undefined; renderForms: boolean; /** * - Enable embedded script execution. */ enableScripting?: boolean | undefined; /** * - Some fields have JS actions. * The default value is `false`. */ hasJSActions?: boolean | undefined; annotationCanvasMap?: Map<string, HTMLCanvasElement> | undefined; }; /** * @typedef {Object} AnnotationLayerParameters * @property {PageViewport} viewport * @property {HTMLDivElement} div * @property {Array} annotations * @property {PDFPageProxy} page * @property {IPDFLinkService} linkService * @property {IDownloadManager} downloadManager * @property {string} [imageResourcesPath] - Path for image resources, mainly * for annotation icons. Include trailing slash. * @property {boolean} renderForms * @property {boolean} [enableScripting] - Enable embedded script execution. * @property {boolean} [hasJSActions] - Some fields have JS actions. * The default value is `false`. * @property {Map<string, HTMLCanvasElement>} [annotationCanvasMap] */ export class AnnotationLayer { static "__#30@#appendElement"(element: any, id: any, div: any, accessibilityManager: any): void; /** * Render a new annotation layer with all annotation elements. * * @public * @param {AnnotationLayerParameters} parameters * @memberof AnnotationLayer */ public static render(parameters: AnnotationLayerParameters): void; /** * Update the annotation elements on existing annotation layer. * * @public * @param {AnnotationLayerParameters} parameters * @memberof AnnotationLayer */ public static update(parameters: AnnotationLayerParameters): void; /** * @param {HTMLDivElement} div * @param {PageViewport} viewport */ static "__#30@#setDimensions"(div: HTMLDivElement, { width, height, rotation }: PageViewport): void; static "__#30@#setAnnotationCanvasMap"(div: any, annotationCanvasMap: any): void; } import { AnnotationStorage } from "./annotation_storage.js";