pdf_viewer.d.ts 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
  2. export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
  3. export type PageViewport = import("../src/display/display_utils").PageViewport;
  4. export type OptionalContentConfig = import("../src/display/optional_content_config").OptionalContentConfig;
  5. export type EventBus = import("./event_utils").EventBus;
  6. export type IDownloadManager = import("./interfaces").IDownloadManager;
  7. export type IL10n = import("./interfaces").IL10n;
  8. export type IPDFAnnotationLayerFactory = import("./interfaces").IPDFAnnotationLayerFactory;
  9. export type IPDFAnnotationEditorLayerFactory = import("./interfaces").IPDFAnnotationEditorLayerFactory;
  10. export type IPDFLinkService = import("./interfaces").IPDFLinkService;
  11. export type IPDFStructTreeLayerFactory = import("./interfaces").IPDFStructTreeLayerFactory;
  12. export type IPDFTextLayerFactory = import("./interfaces").IPDFTextLayerFactory;
  13. export type IPDFXfaLayerFactory = import("./interfaces").IPDFXfaLayerFactory;
  14. export type TextAccessibilityManager = import("./text_accessibility.js").TextAccessibilityManager;
  15. export type PDFViewerOptions = {
  16. /**
  17. * - The container for the viewer element.
  18. */
  19. container: HTMLDivElement;
  20. /**
  21. * - The viewer element.
  22. */
  23. viewer?: HTMLDivElement | undefined;
  24. /**
  25. * - The application event bus.
  26. */
  27. eventBus: EventBus;
  28. /**
  29. * - The navigation/linking service.
  30. */
  31. linkService: IPDFLinkService;
  32. /**
  33. * - The download manager
  34. * component.
  35. */
  36. downloadManager?: import("./interfaces").IDownloadManager | undefined;
  37. /**
  38. * - The find controller
  39. * component.
  40. */
  41. findController?: any;
  42. /**
  43. * - The scripting manager
  44. * component.
  45. */
  46. scriptingManager?: any;
  47. /**
  48. * - The rendering queue object.
  49. */
  50. renderingQueue?: PDFRenderingQueue | undefined;
  51. /**
  52. * - Removes the border shadow around
  53. * the pages. The default value is `false`.
  54. */
  55. removePageBorders?: boolean | undefined;
  56. /**
  57. * - Controls if the text layer used for
  58. * selection and searching is created. The constants from {TextLayerMode}
  59. * should be used. The default value is `TextLayerMode.ENABLE`.
  60. */
  61. textLayerMode?: number | undefined;
  62. /**
  63. * - Controls if the annotation layer is
  64. * created, and if interactive form elements or `AnnotationStorage`-data are
  65. * being rendered. The constants from {@link AnnotationMode } should be used;
  66. * see also {@link RenderParameters } and {@link GetOperatorListParameters }.
  67. * The default value is `AnnotationMode.ENABLE_FORMS`.
  68. */
  69. annotationMode?: number | undefined;
  70. /**
  71. * - Enables the creation and editing
  72. * of new Annotations. The constants from {@link AnnotationEditorType } should
  73. * be used. The default value is `AnnotationEditorType.NONE`.
  74. */
  75. annotationEditorMode?: number | undefined;
  76. /**
  77. * - Path for image resources, mainly
  78. * mainly for annotation icons. Include trailing slash.
  79. */
  80. imageResourcesPath?: string | undefined;
  81. /**
  82. * - Enables automatic rotation of
  83. * landscape pages upon printing. The default is `false`.
  84. */
  85. enablePrintAutoRotate?: boolean | undefined;
  86. /**
  87. * - Enables CSS only zooming. The default
  88. * value is `false`.
  89. */
  90. useOnlyCssZoom?: boolean | undefined;
  91. /**
  92. * - The maximum supported canvas size in
  93. * total pixels, i.e. width * height. Use -1 for no limit. The default value
  94. * is 4096 * 4096 (16 mega-pixels).
  95. */
  96. maxCanvasPixels?: number | undefined;
  97. /**
  98. * - Localization service.
  99. */
  100. l10n: IL10n;
  101. /**
  102. * - Enables PDF document permissions,
  103. * when they exist. The default value is `false`.
  104. */
  105. enablePermissions?: boolean | undefined;
  106. /**
  107. * - Overwrites background and foreground colors
  108. * with user defined ones in order to improve readability in high contrast
  109. * mode.
  110. */
  111. pageColors?: Object | undefined;
  112. };
  113. export namespace PagesCountLimit {
  114. const FORCE_SCROLL_MODE_PAGE: number;
  115. const FORCE_LAZY_PAGE_INIT: number;
  116. const PAUSE_EAGER_PAGE_INIT: number;
  117. }
  118. /**
  119. * @typedef {Object} PDFViewerOptions
  120. * @property {HTMLDivElement} container - The container for the viewer element.
  121. * @property {HTMLDivElement} [viewer] - The viewer element.
  122. * @property {EventBus} eventBus - The application event bus.
  123. * @property {IPDFLinkService} linkService - The navigation/linking service.
  124. * @property {IDownloadManager} [downloadManager] - The download manager
  125. * component.
  126. * @property {PDFFindController} [findController] - The find controller
  127. * component.
  128. * @property {PDFScriptingManager} [scriptingManager] - The scripting manager
  129. * component.
  130. * @property {PDFRenderingQueue} [renderingQueue] - The rendering queue object.
  131. * @property {boolean} [removePageBorders] - Removes the border shadow around
  132. * the pages. The default value is `false`.
  133. * @property {number} [textLayerMode] - Controls if the text layer used for
  134. * selection and searching is created. The constants from {TextLayerMode}
  135. * should be used. The default value is `TextLayerMode.ENABLE`.
  136. * @property {number} [annotationMode] - Controls if the annotation layer is
  137. * created, and if interactive form elements or `AnnotationStorage`-data are
  138. * being rendered. The constants from {@link AnnotationMode} should be used;
  139. * see also {@link RenderParameters} and {@link GetOperatorListParameters}.
  140. * The default value is `AnnotationMode.ENABLE_FORMS`.
  141. * @property {number} [annotationEditorMode] - Enables the creation and editing
  142. * of new Annotations. The constants from {@link AnnotationEditorType} should
  143. * be used. The default value is `AnnotationEditorType.NONE`.
  144. * @property {string} [imageResourcesPath] - Path for image resources, mainly
  145. * mainly for annotation icons. Include trailing slash.
  146. * @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of
  147. * landscape pages upon printing. The default is `false`.
  148. * @property {boolean} [useOnlyCssZoom] - Enables CSS only zooming. The default
  149. * value is `false`.
  150. * @property {number} [maxCanvasPixels] - The maximum supported canvas size in
  151. * total pixels, i.e. width * height. Use -1 for no limit. The default value
  152. * is 4096 * 4096 (16 mega-pixels).
  153. * @property {IL10n} l10n - Localization service.
  154. * @property {boolean} [enablePermissions] - Enables PDF document permissions,
  155. * when they exist. The default value is `false`.
  156. * @property {Object} [pageColors] - Overwrites background and foreground colors
  157. * with user defined ones in order to improve readability in high contrast
  158. * mode.
  159. */
  160. export class PDFPageViewBuffer {
  161. constructor(size: any);
  162. push(view: any): void;
  163. /**
  164. * After calling resize, the size of the buffer will be `newSize`.
  165. * The optional parameter `idsToKeep` is, if present, a Set of page-ids to
  166. * push to the back of the buffer, delaying their destruction. The size of
  167. * `idsToKeep` has no impact on the final size of the buffer; if `idsToKeep`
  168. * is larger than `newSize`, some of those pages will be destroyed anyway.
  169. */
  170. resize(newSize: any, idsToKeep?: null): void;
  171. has(view: any): boolean;
  172. [Symbol.iterator](): IterableIterator<any>;
  173. #private;
  174. }
  175. /**
  176. * Simple viewer control to display PDF content/pages.
  177. *
  178. * @implements {IPDFAnnotationLayerFactory}
  179. * @implements {IPDFAnnotationEditorLayerFactory}
  180. * @implements {IPDFStructTreeLayerFactory}
  181. * @implements {IPDFTextLayerFactory}
  182. * @implements {IPDFXfaLayerFactory}
  183. */
  184. export class PDFViewer implements IPDFAnnotationLayerFactory, IPDFAnnotationEditorLayerFactory, IPDFStructTreeLayerFactory, IPDFTextLayerFactory, IPDFXfaLayerFactory {
  185. /**
  186. * @param {PDFViewerOptions} options
  187. */
  188. constructor(options: PDFViewerOptions);
  189. container: HTMLDivElement;
  190. viewer: Element | null;
  191. eventBus: import("./event_utils").EventBus;
  192. linkService: import("./interfaces").IPDFLinkService;
  193. downloadManager: import("./interfaces").IDownloadManager | null;
  194. findController: any;
  195. _scriptingManager: any;
  196. removePageBorders: boolean;
  197. textLayerMode: number;
  198. imageResourcesPath: string;
  199. enablePrintAutoRotate: boolean;
  200. renderer: any;
  201. useOnlyCssZoom: boolean;
  202. maxCanvasPixels: number | undefined;
  203. l10n: import("./interfaces").IL10n;
  204. pageColors: Object | null;
  205. defaultRenderingQueue: boolean;
  206. renderingQueue: PDFRenderingQueue | undefined;
  207. scroll: {
  208. right: boolean;
  209. down: boolean;
  210. lastX: any;
  211. lastY: any;
  212. _eventHandler: (evt: any) => void;
  213. };
  214. presentationModeState: number;
  215. _onBeforeDraw: ((evt: any) => void) | null;
  216. _onAfterDraw: any;
  217. get pagesCount(): number;
  218. getPageView(index: any): any;
  219. /**
  220. * @type {boolean} - True if all {PDFPageView} objects are initialized.
  221. */
  222. get pageViewsReady(): boolean;
  223. /**
  224. * @type {boolean}
  225. */
  226. get renderForms(): boolean;
  227. /**
  228. * @type {boolean}
  229. */
  230. get enableScripting(): boolean;
  231. /**
  232. * @param {number} val - The page number.
  233. */
  234. set currentPageNumber(arg: number);
  235. /**
  236. * @type {number}
  237. */
  238. get currentPageNumber(): number;
  239. /**
  240. * @returns {boolean} Whether the pageNumber is valid (within bounds).
  241. * @private
  242. */
  243. private _setCurrentPageNumber;
  244. _currentPageNumber: any;
  245. /**
  246. * @param {string} val - The page label.
  247. */
  248. set currentPageLabel(arg: string | null);
  249. /**
  250. * @type {string|null} Returns the current page label, or `null` if no page
  251. * labels exist.
  252. */
  253. get currentPageLabel(): string | null;
  254. /**
  255. * @param {number} val - Scale of the pages in percents.
  256. */
  257. set currentScale(arg: number);
  258. /**
  259. * @type {number}
  260. */
  261. get currentScale(): number;
  262. /**
  263. * @param val - The scale of the pages (in percent or predefined value).
  264. */
  265. set currentScaleValue(arg: string);
  266. /**
  267. * @type {string}
  268. */
  269. get currentScaleValue(): string;
  270. /**
  271. * @param {number} rotation - The rotation of the pages (0, 90, 180, 270).
  272. */
  273. set pagesRotation(arg: number);
  274. /**
  275. * @type {number}
  276. */
  277. get pagesRotation(): number;
  278. _pagesRotation: any;
  279. get firstPagePromise(): any;
  280. get onePageRendered(): any;
  281. get pagesPromise(): any;
  282. /**
  283. * @param {PDFDocumentProxy} pdfDocument
  284. */
  285. setDocument(pdfDocument: PDFDocumentProxy): void;
  286. pdfDocument: import("../src/display/api").PDFDocumentProxy | undefined;
  287. _scrollMode: any;
  288. _optionalContentConfigPromise: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | null | undefined;
  289. /**
  290. * @param {Array|null} labels
  291. */
  292. setPageLabels(labels: any[] | null): void;
  293. _pageLabels: any[] | null | undefined;
  294. _resetView(): void;
  295. _pages: any[] | undefined;
  296. _currentScale: any;
  297. _currentScaleValue: any;
  298. _location: {
  299. pageNumber: any;
  300. scale: any;
  301. top: number;
  302. left: number;
  303. rotation: any;
  304. pdfOpenParams: string;
  305. } | null | undefined;
  306. _firstPageCapability: any;
  307. _onePageRenderedCapability: any;
  308. _pagesCapability: any;
  309. _previousScrollMode: any;
  310. _spreadMode: any;
  311. _scrollUpdate(): void;
  312. _setScaleUpdatePages(newScale: any, newValue: any, noScroll?: boolean, preset?: boolean): void;
  313. /**
  314. * @private
  315. */
  316. private get _pageWidthScaleFactor();
  317. _setScale(value: any, noScroll?: boolean): void;
  318. /**
  319. * @param {string} label - The page label.
  320. * @returns {number|null} The page number corresponding to the page label,
  321. * or `null` when no page labels exist and/or the input is invalid.
  322. */
  323. pageLabelToPageNumber(label: string): number | null;
  324. /**
  325. * @typedef {Object} ScrollPageIntoViewParameters
  326. * @property {number} pageNumber - The page number.
  327. * @property {Array} [destArray] - The original PDF destination array, in the
  328. * format: <page-ref> </XYZ|/FitXXX> <args..>
  329. * @property {boolean} [allowNegativeOffset] - Allow negative page offsets.
  330. * The default value is `false`.
  331. * @property {boolean} [ignoreDestinationZoom] - Ignore the zoom argument in
  332. * the destination array. The default value is `false`.
  333. */
  334. /**
  335. * Scrolls page into view.
  336. * @param {ScrollPageIntoViewParameters} params
  337. */
  338. scrollPageIntoView({ pageNumber, destArray, allowNegativeOffset, ignoreDestinationZoom, }: {
  339. /**
  340. * - The page number.
  341. */
  342. pageNumber: number;
  343. /**
  344. * - The original PDF destination array, in the
  345. * format: <page-ref> </XYZ|/FitXXX> <args..>
  346. */
  347. destArray?: any[] | undefined;
  348. /**
  349. * - Allow negative page offsets.
  350. * The default value is `false`.
  351. */
  352. allowNegativeOffset?: boolean | undefined;
  353. /**
  354. * - Ignore the zoom argument in
  355. * the destination array. The default value is `false`.
  356. */
  357. ignoreDestinationZoom?: boolean | undefined;
  358. }): void;
  359. _updateLocation(firstPage: any): void;
  360. update(): void;
  361. containsElement(element: any): boolean;
  362. focus(): void;
  363. get _isContainerRtl(): boolean;
  364. get isInPresentationMode(): boolean;
  365. get isChangingPresentationMode(): boolean;
  366. get isHorizontalScrollbarEnabled(): boolean;
  367. get isVerticalScrollbarEnabled(): boolean;
  368. _getVisiblePages(): Object;
  369. /**
  370. * @param {number} pageNumber
  371. */
  372. isPageVisible(pageNumber: number): any;
  373. /**
  374. * @param {number} pageNumber
  375. */
  376. isPageCached(pageNumber: number): any;
  377. cleanup(): void;
  378. /**
  379. * @private
  380. */
  381. private _cancelRendering;
  382. forceRendering(currentlyVisiblePages: any): boolean;
  383. /**
  384. * @typedef {Object} CreateTextLayerBuilderParameters
  385. * @property {HTMLDivElement} textLayerDiv
  386. * @property {number} pageIndex
  387. * @property {PageViewport} viewport
  388. * @property {EventBus} eventBus
  389. * @property {TextHighlighter} highlighter
  390. * @property {TextAccessibilityManager} [accessibilityManager]
  391. */
  392. /**
  393. * @param {CreateTextLayerBuilderParameters}
  394. * @returns {TextLayerBuilder}
  395. */
  396. createTextLayerBuilder({ textLayerDiv, pageIndex, viewport, eventBus, highlighter, accessibilityManager, }: {
  397. textLayerDiv: HTMLDivElement;
  398. pageIndex: number;
  399. viewport: PageViewport;
  400. eventBus: EventBus;
  401. highlighter: TextHighlighter;
  402. accessibilityManager?: import("./text_accessibility.js").TextAccessibilityManager | undefined;
  403. }): TextLayerBuilder;
  404. /**
  405. * @typedef {Object} CreateTextHighlighterParameters
  406. * @property {number} pageIndex
  407. * @property {EventBus} eventBus
  408. */
  409. /**
  410. * @param {CreateTextHighlighterParameters}
  411. * @returns {TextHighlighter}
  412. */
  413. createTextHighlighter({ pageIndex, eventBus }: {
  414. pageIndex: number;
  415. eventBus: EventBus;
  416. }): TextHighlighter;
  417. /**
  418. * @typedef {Object} CreateAnnotationLayerBuilderParameters
  419. * @property {HTMLDivElement} pageDiv
  420. * @property {PDFPageProxy} pdfPage
  421. * @property {AnnotationStorage} [annotationStorage] - Storage for annotation
  422. * data in forms.
  423. * @property {string} [imageResourcesPath] - Path for image resources, mainly
  424. * for annotation icons. Include trailing slash.
  425. * @property {boolean} renderForms
  426. * @property {IL10n} l10n
  427. * @property {boolean} [enableScripting]
  428. * @property {Promise<boolean>} [hasJSActionsPromise]
  429. * @property {Object} [mouseState]
  430. * @property {Promise<Object<string, Array<Object>> | null>}
  431. * [fieldObjectsPromise]
  432. * @property {Map<string, HTMLCanvasElement>} [annotationCanvasMap] - Map some
  433. * annotation ids with canvases used to render them.
  434. * @property {TextAccessibilityManager} [accessibilityManager]
  435. */
  436. /**
  437. * @param {CreateAnnotationLayerBuilderParameters}
  438. * @returns {AnnotationLayerBuilder}
  439. */
  440. createAnnotationLayerBuilder({ pageDiv, pdfPage, annotationStorage, imageResourcesPath, renderForms, l10n, enableScripting, hasJSActionsPromise, mouseState, fieldObjectsPromise, annotationCanvasMap, accessibilityManager, }: {
  441. pageDiv: HTMLDivElement;
  442. pdfPage: PDFPageProxy;
  443. /**
  444. * - Storage for annotation
  445. * data in forms.
  446. */
  447. annotationStorage?: any;
  448. /**
  449. * - Path for image resources, mainly
  450. * for annotation icons. Include trailing slash.
  451. */
  452. imageResourcesPath?: string | undefined;
  453. renderForms: boolean;
  454. l10n: IL10n;
  455. enableScripting?: boolean | undefined;
  456. hasJSActionsPromise?: Promise<boolean> | undefined;
  457. mouseState?: Object | undefined;
  458. fieldObjectsPromise?: Promise<{
  459. [x: string]: Object[];
  460. } | null> | undefined;
  461. /**
  462. * - Map some
  463. * annotation ids with canvases used to render them.
  464. */
  465. annotationCanvasMap?: Map<string, HTMLCanvasElement> | undefined;
  466. accessibilityManager?: import("./text_accessibility.js").TextAccessibilityManager | undefined;
  467. }): AnnotationLayerBuilder;
  468. /**
  469. * @typedef {Object} CreateAnnotationEditorLayerBuilderParameters
  470. * @property {AnnotationEditorUIManager} [uiManager]
  471. * @property {HTMLDivElement} pageDiv
  472. * @property {PDFPageProxy} pdfPage
  473. * @property {IL10n} l10n
  474. * @property {AnnotationStorage} [annotationStorage] - Storage for annotation
  475. * @property {TextAccessibilityManager} [accessibilityManager]
  476. * data in forms.
  477. */
  478. /**
  479. * @param {CreateAnnotationEditorLayerBuilderParameters}
  480. * @returns {AnnotationEditorLayerBuilder}
  481. */
  482. createAnnotationEditorLayerBuilder({ uiManager, pageDiv, pdfPage, accessibilityManager, l10n, annotationStorage, }: {
  483. uiManager?: any;
  484. pageDiv: HTMLDivElement;
  485. pdfPage: PDFPageProxy;
  486. l10n: IL10n;
  487. /**
  488. * - Storage for annotation
  489. */
  490. annotationStorage?: any;
  491. /**
  492. * data in forms.
  493. */
  494. accessibilityManager?: import("./text_accessibility.js").TextAccessibilityManager | undefined;
  495. }): AnnotationEditorLayerBuilder;
  496. /**
  497. * @typedef {Object} CreateXfaLayerBuilderParameters
  498. * @property {HTMLDivElement} pageDiv
  499. * @property {PDFPageProxy} pdfPage
  500. * @property {AnnotationStorage} [annotationStorage] - Storage for annotation
  501. * data in forms.
  502. */
  503. /**
  504. * @param {CreateXfaLayerBuilderParameters}
  505. * @returns {XfaLayerBuilder}
  506. */
  507. createXfaLayerBuilder({ pageDiv, pdfPage, annotationStorage, }: {
  508. pageDiv: HTMLDivElement;
  509. pdfPage: PDFPageProxy;
  510. /**
  511. * - Storage for annotation
  512. * data in forms.
  513. */
  514. annotationStorage?: any;
  515. }): XfaLayerBuilder;
  516. /**
  517. * @typedef {Object} CreateStructTreeLayerBuilderParameters
  518. * @property {PDFPageProxy} pdfPage
  519. */
  520. /**
  521. * @param {CreateStructTreeLayerBuilderParameters}
  522. * @returns {StructTreeLayerBuilder}
  523. */
  524. createStructTreeLayerBuilder({ pdfPage }: {
  525. pdfPage: PDFPageProxy;
  526. }): StructTreeLayerBuilder;
  527. /**
  528. * @type {boolean} Whether all pages of the PDF document have identical
  529. * widths and heights.
  530. */
  531. get hasEqualPageSizes(): boolean;
  532. /**
  533. * Returns sizes of the pages.
  534. * @returns {Array} Array of objects with width/height/rotation fields.
  535. */
  536. getPagesOverview(): any[];
  537. /**
  538. * @param {Promise<OptionalContentConfig>} promise - A promise that is
  539. * resolved with an {@link OptionalContentConfig} instance.
  540. */
  541. set optionalContentConfigPromise(arg: Promise<import("../src/display/optional_content_config").OptionalContentConfig | null>);
  542. /**
  543. * @type {Promise<OptionalContentConfig | null>}
  544. */
  545. get optionalContentConfigPromise(): Promise<import("../src/display/optional_content_config").OptionalContentConfig | null>;
  546. /**
  547. * @param {number} mode - The direction in which the document pages should be
  548. * laid out within the scrolling container.
  549. * The constants from {ScrollMode} should be used.
  550. */
  551. set scrollMode(arg: number);
  552. /**
  553. * @type {number} One of the values in {ScrollMode}.
  554. */
  555. get scrollMode(): number;
  556. _updateScrollMode(pageNumber?: null): void;
  557. /**
  558. * @param {number} mode - Group the pages in spreads, starting with odd- or
  559. * even-number pages (unless `SpreadMode.NONE` is used).
  560. * The constants from {SpreadMode} should be used.
  561. */
  562. set spreadMode(arg: number);
  563. /**
  564. * @type {number} One of the values in {SpreadMode}.
  565. */
  566. get spreadMode(): number;
  567. _updateSpreadMode(pageNumber?: null): void;
  568. /**
  569. * @private
  570. */
  571. private _getPageAdvance;
  572. /**
  573. * Go to the next page, taking scroll/spread-modes into account.
  574. * @returns {boolean} Whether navigation occured.
  575. */
  576. nextPage(): boolean;
  577. /**
  578. * Go to the previous page, taking scroll/spread-modes into account.
  579. * @returns {boolean} Whether navigation occured.
  580. */
  581. previousPage(): boolean;
  582. /**
  583. * Increase the current zoom level one, or more, times.
  584. * @param {number} [steps] - Defaults to zooming once.
  585. */
  586. increaseScale(steps?: number | undefined): void;
  587. /**
  588. * Decrease the current zoom level one, or more, times.
  589. * @param {number} [steps] - Defaults to zooming once.
  590. */
  591. decreaseScale(steps?: number | undefined): void;
  592. updateContainerHeightCss(): void;
  593. /**
  594. * @param {number} mode - AnnotationEditor mode (None, FreeText, Ink, ...)
  595. */
  596. set annotationEditorMode(arg: number);
  597. /**
  598. * @type {number}
  599. */
  600. get annotationEditorMode(): number;
  601. set annotationEditorParams(arg: any);
  602. refresh(): void;
  603. #private;
  604. }
  605. import { PDFRenderingQueue } from "./pdf_rendering_queue.js";
  606. import { TextHighlighter } from "./text_highlighter.js";
  607. import { TextLayerBuilder } from "./text_layer_builder.js";
  608. import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";
  609. import { AnnotationEditorLayerBuilder } from "./annotation_editor_layer_builder.js";
  610. import { XfaLayerBuilder } from "./xfa_layer_builder.js";
  611. import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js";