@pdftools/four-heights-pdf-web-viewer 4.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/LICENSE.md +446 -0
  2. package/README.md +145 -0
  3. package/css/pdf-web-viewer.css +2407 -0
  4. package/doc/PdfWebViewer.pdf +0 -0
  5. package/es6/common/Checkbox.d.ts +9 -0
  6. package/es6/common/Checkbox.js +8 -0
  7. package/es6/common/Color.d.ts +23 -0
  8. package/es6/common/Color.js +118 -0
  9. package/es6/common/ColorPicker.d.ts +15 -0
  10. package/es6/common/ColorPicker.js +46 -0
  11. package/es6/common/Contextbar.d.ts +6 -0
  12. package/es6/common/Contextbar.js +19 -0
  13. package/es6/common/DragMoveHandler.d.ts +51 -0
  14. package/es6/common/DragMoveHandler.js +175 -0
  15. package/es6/common/Dropdown.d.ts +36 -0
  16. package/es6/common/Dropdown.js +76 -0
  17. package/es6/common/DropdownMenu.d.ts +9 -0
  18. package/es6/common/DropdownMenu.js +10 -0
  19. package/es6/common/DropdownSeparator.d.ts +3 -0
  20. package/es6/common/DropdownSeparator.js +6 -0
  21. package/es6/common/Icon.d.ts +13 -0
  22. package/es6/common/Icon.js +8 -0
  23. package/es6/common/Loader.d.ts +3 -0
  24. package/es6/common/Loader.js +6 -0
  25. package/es6/common/RangeSlider.d.ts +17 -0
  26. package/es6/common/RangeSlider.js +42 -0
  27. package/es6/common/StrokeStylePicker.d.ts +11 -0
  28. package/es6/common/StrokeStylePicker.js +20 -0
  29. package/es6/common/StrokeWidthPicker.d.ts +11 -0
  30. package/es6/common/StrokeWidthPicker.js +20 -0
  31. package/es6/common/Toolbar.d.ts +10 -0
  32. package/es6/common/Toolbar.js +6 -0
  33. package/es6/common/ToolbarButton.d.ts +14 -0
  34. package/es6/common/ToolbarButton.js +21 -0
  35. package/es6/common/ToolbarFileButton.d.ts +15 -0
  36. package/es6/common/ToolbarFileButton.js +27 -0
  37. package/es6/common/ToolbarItemGroup.d.ts +8 -0
  38. package/es6/common/ToolbarItemGroup.js +12 -0
  39. package/es6/common/ToolbarSeparator.d.ts +3 -0
  40. package/es6/common/ToolbarSeparator.js +6 -0
  41. package/es6/common/Tools.d.ts +10 -0
  42. package/es6/common/Tools.js +89 -0
  43. package/es6/common/TooltipManager.d.ts +12 -0
  44. package/es6/common/TooltipManager.js +54 -0
  45. package/es6/common/TranslationManager.d.ts +11 -0
  46. package/es6/common/TranslationManager.js +61 -0
  47. package/es6/common/classNames.d.ts +2 -0
  48. package/es6/common/classNames.js +18 -0
  49. package/es6/common/formatDate.d.ts +1 -0
  50. package/es6/common/formatDate.js +1 -0
  51. package/es6/common/icons.d.ts +13 -0
  52. package/es6/common/icons.js +412 -0
  53. package/es6/common/utils.d.ts +2 -0
  54. package/es6/common/utils.js +19 -0
  55. package/es6/custom/history.d.ts +2 -0
  56. package/es6/custom/history.js +59 -0
  57. package/es6/index.d.ts +5 -0
  58. package/es6/index.js +5 -0
  59. package/es6/lib/hyperapp/index.d.ts +108 -0
  60. package/es6/lib/hyperapp/index.js +327 -0
  61. package/es6/modules/CanvasLayer.d.ts +32 -0
  62. package/es6/modules/CanvasLayer.js +83 -0
  63. package/es6/modules/CanvasModule.d.ts +59 -0
  64. package/es6/modules/CanvasModule.js +98 -0
  65. package/es6/modules/eraser/EraserLayer.d.ts +13 -0
  66. package/es6/modules/eraser/EraserLayer.js +141 -0
  67. package/es6/modules/eraser/EraserModule.d.ts +19 -0
  68. package/es6/modules/eraser/EraserModule.js +34 -0
  69. package/es6/modules/eraser/EraserToolbar.d.ts +10 -0
  70. package/es6/modules/eraser/EraserToolbar.js +30 -0
  71. package/es6/modules/form-fields/CheckBoxWidget.d.ts +9 -0
  72. package/es6/modules/form-fields/CheckBoxWidget.js +45 -0
  73. package/es6/modules/form-fields/ComboBoxWidget.d.ts +22 -0
  74. package/es6/modules/form-fields/ComboBoxWidget.js +152 -0
  75. package/es6/modules/form-fields/EditFormFieldLayer.d.ts +17 -0
  76. package/es6/modules/form-fields/EditFormFieldLayer.js +238 -0
  77. package/es6/modules/form-fields/FormFieldModule.d.ts +15 -0
  78. package/es6/modules/form-fields/FormFieldModule.js +27 -0
  79. package/es6/modules/form-fields/ListBoxWidget.d.ts +9 -0
  80. package/es6/modules/form-fields/ListBoxWidget.js +73 -0
  81. package/es6/modules/form-fields/RadioButtonWidget.d.ts +9 -0
  82. package/es6/modules/form-fields/RadioButtonWidget.js +45 -0
  83. package/es6/modules/form-fields/SelectListWidget.d.ts +9 -0
  84. package/es6/modules/form-fields/SelectListWidget.js +45 -0
  85. package/es6/modules/form-fields/TextBoxWidget.d.ts +9 -0
  86. package/es6/modules/form-fields/TextBoxWidget.js +53 -0
  87. package/es6/modules/form-fields/WidgetBase.d.ts +23 -0
  88. package/es6/modules/form-fields/WidgetBase.js +29 -0
  89. package/es6/modules/freetext-annotation/AddFreetextAnnotationLayer.d.ts +19 -0
  90. package/es6/modules/freetext-annotation/AddFreetextAnnotationLayer.js +181 -0
  91. package/es6/modules/freetext-annotation/AddFreetextAnnotationToolbar.d.ts +21 -0
  92. package/es6/modules/freetext-annotation/AddFreetextAnnotationToolbar.js +37 -0
  93. package/es6/modules/freetext-annotation/EditFreetextAnnotationLayer.d.ts +20 -0
  94. package/es6/modules/freetext-annotation/EditFreetextAnnotationLayer.js +211 -0
  95. package/es6/modules/freetext-annotation/EditFreetextAnnotationToolbar.d.ts +50 -0
  96. package/es6/modules/freetext-annotation/EditFreetextAnnotationToolbar.js +118 -0
  97. package/es6/modules/freetext-annotation/FreetextAnnotationModule.d.ts +28 -0
  98. package/es6/modules/freetext-annotation/FreetextAnnotationModule.js +58 -0
  99. package/es6/modules/freetext-annotation/RichTextEditor.d.ts +31 -0
  100. package/es6/modules/freetext-annotation/RichTextEditor.js +223 -0
  101. package/es6/modules/highlight-annotation/AddHighlightAnnotationLayer.d.ts +31 -0
  102. package/es6/modules/highlight-annotation/AddHighlightAnnotationLayer.js +289 -0
  103. package/es6/modules/highlight-annotation/AddHighlightAnnotationToolbar.d.ts +20 -0
  104. package/es6/modules/highlight-annotation/AddHighlightAnnotationToolbar.js +52 -0
  105. package/es6/modules/highlight-annotation/EditHighlightAnnotationLayer.d.ts +15 -0
  106. package/es6/modules/highlight-annotation/EditHighlightAnnotationLayer.js +104 -0
  107. package/es6/modules/highlight-annotation/EditHighlightAnnotationToolbar.d.ts +15 -0
  108. package/es6/modules/highlight-annotation/EditHighlightAnnotationToolbar.js +28 -0
  109. package/es6/modules/highlight-annotation/HighlightAnnotationModule.d.ts +27 -0
  110. package/es6/modules/highlight-annotation/HighlightAnnotationModule.js +54 -0
  111. package/es6/modules/image-annotations/ImageAnnotationModule.d.ts +23 -0
  112. package/es6/modules/image-annotations/ImageAnnotationModule.js +169 -0
  113. package/es6/modules/index.d.ts +13 -0
  114. package/es6/modules/index.js +13 -0
  115. package/es6/modules/ink-annotation/AddInkAnnotationLayer.d.ts +40 -0
  116. package/es6/modules/ink-annotation/AddInkAnnotationLayer.js +503 -0
  117. package/es6/modules/ink-annotation/AddInkAnnotationToolbar.d.ts +30 -0
  118. package/es6/modules/ink-annotation/AddInkAnnotationToolbar.js +53 -0
  119. package/es6/modules/ink-annotation/EditInkAnnotationLayer.d.ts +20 -0
  120. package/es6/modules/ink-annotation/EditInkAnnotationLayer.js +137 -0
  121. package/es6/modules/ink-annotation/EditInkAnnotationToolbar.d.ts +25 -0
  122. package/es6/modules/ink-annotation/EditInkAnnotationToolbar.js +47 -0
  123. package/es6/modules/ink-annotation/InkAnnotationModule.d.ts +27 -0
  124. package/es6/modules/ink-annotation/InkAnnotationModule.js +50 -0
  125. package/es6/modules/popup/Popup.d.ts +64 -0
  126. package/es6/modules/popup/Popup.js +360 -0
  127. package/es6/modules/popup/PopupLayer.d.ts +31 -0
  128. package/es6/modules/popup/PopupLayer.js +509 -0
  129. package/es6/modules/popup/PopupModule.d.ts +16 -0
  130. package/es6/modules/popup/PopupModule.js +25 -0
  131. package/es6/modules/print-service/PrintServiceDialog.d.ts +30 -0
  132. package/es6/modules/print-service/PrintServiceDialog.js +134 -0
  133. package/es6/modules/print-service/PrintServiceLayer.d.ts +24 -0
  134. package/es6/modules/print-service/PrintServiceLayer.js +310 -0
  135. package/es6/modules/print-service/PrintServiceModule.d.ts +18 -0
  136. package/es6/modules/print-service/PrintServiceModule.js +30 -0
  137. package/es6/modules/shape-annotations/AddShapeAnnotationLayer.d.ts +24 -0
  138. package/es6/modules/shape-annotations/AddShapeAnnotationLayer.js +210 -0
  139. package/es6/modules/shape-annotations/AddShapeAnnotationToolbar.d.ts +26 -0
  140. package/es6/modules/shape-annotations/AddShapeAnnotationToolbar.js +69 -0
  141. package/es6/modules/shape-annotations/EditShapeAnnotationLayer.d.ts +19 -0
  142. package/es6/modules/shape-annotations/EditShapeAnnotationLayer.js +148 -0
  143. package/es6/modules/shape-annotations/EditShapeAnnotationToolbar.d.ts +24 -0
  144. package/es6/modules/shape-annotations/EditShapeAnnotationToolbar.js +57 -0
  145. package/es6/modules/shape-annotations/ShapeAnnotationModule.d.ts +28 -0
  146. package/es6/modules/shape-annotations/ShapeAnnotationModule.js +50 -0
  147. package/es6/modules/stamp-annotation/AddStampAnnotationLayer.d.ts +19 -0
  148. package/es6/modules/stamp-annotation/AddStampAnnotationLayer.js +257 -0
  149. package/es6/modules/stamp-annotation/AddStampAnnotationToolbar.d.ts +17 -0
  150. package/es6/modules/stamp-annotation/AddStampAnnotationToolbar.js +68 -0
  151. package/es6/modules/stamp-annotation/StampAnnotationModule.d.ts +20 -0
  152. package/es6/modules/stamp-annotation/StampAnnotationModule.js +35 -0
  153. package/es6/modules/text-annotation/AddTextAnnotationLayer.d.ts +14 -0
  154. package/es6/modules/text-annotation/AddTextAnnotationLayer.js +132 -0
  155. package/es6/modules/text-annotation/AddTextAnnotationToolbar.d.ts +15 -0
  156. package/es6/modules/text-annotation/AddTextAnnotationToolbar.js +27 -0
  157. package/es6/modules/text-annotation/TextAnnotationModule.d.ts +19 -0
  158. package/es6/modules/text-annotation/TextAnnotationModule.js +34 -0
  159. package/es6/pdf-viewer-api/ImageContainer.d.ts +10 -0
  160. package/es6/pdf-viewer-api/ImageContainer.js +43 -0
  161. package/es6/pdf-viewer-api/PdfViewerApi.d.ts +463 -0
  162. package/es6/pdf-viewer-api/PdfViewerApi.js +732 -0
  163. package/es6/pdf-viewer-api/PdfViewingWrapper.d.ts +178 -0
  164. package/es6/pdf-viewer-api/PdfViewingWrapper.js +2037 -0
  165. package/es6/pdf-viewer-api/annotationDefaultBehaviors.d.ts +3 -0
  166. package/es6/pdf-viewer-api/annotationDefaultBehaviors.js +30 -0
  167. package/es6/pdf-viewer-api/enums.d.ts +100 -0
  168. package/es6/pdf-viewer-api/enums.js +113 -0
  169. package/es6/pdf-viewer-api/index.d.ts +3 -0
  170. package/es6/pdf-viewer-api/index.js +3 -0
  171. package/es6/pdf-viewer-api/types.d.ts +284 -0
  172. package/es6/pdf-viewer-api/types.js +6 -0
  173. package/es6/pdf-viewer-canvas/CanvasEvents.d.ts +76 -0
  174. package/es6/pdf-viewer-canvas/CanvasEvents.js +345 -0
  175. package/es6/pdf-viewer-canvas/PdfViewerCanvas.d.ts +175 -0
  176. package/es6/pdf-viewer-canvas/PdfViewerCanvas.js +1226 -0
  177. package/es6/pdf-viewer-canvas/state/annotations.d.ts +36 -0
  178. package/es6/pdf-viewer-canvas/state/annotations.js +157 -0
  179. package/es6/pdf-viewer-canvas/state/appState.d.ts +10 -0
  180. package/es6/pdf-viewer-canvas/state/appState.js +60 -0
  181. package/es6/pdf-viewer-canvas/state/canvas.d.ts +31 -0
  182. package/es6/pdf-viewer-canvas/state/canvas.js +41 -0
  183. package/es6/pdf-viewer-canvas/state/document.d.ts +50 -0
  184. package/es6/pdf-viewer-canvas/state/document.js +99 -0
  185. package/es6/pdf-viewer-canvas/state/pointer.d.ts +31 -0
  186. package/es6/pdf-viewer-canvas/state/pointer.js +31 -0
  187. package/es6/pdf-viewer-canvas/state/scroll.d.ts +22 -0
  188. package/es6/pdf-viewer-canvas/state/scroll.js +25 -0
  189. package/es6/pdf-viewer-canvas/state/search.d.ts +36 -0
  190. package/es6/pdf-viewer-canvas/state/search.js +27 -0
  191. package/es6/pdf-viewer-canvas/state/store.d.ts +39 -0
  192. package/es6/pdf-viewer-canvas/state/store.js +52 -0
  193. package/es6/pdf-viewer-canvas/state/viewer.d.ts +91 -0
  194. package/es6/pdf-viewer-canvas/state/viewer.js +175 -0
  195. package/es6/pdf-viewer-canvas/view-layers/AnnotationSelectionLayer.d.ts +28 -0
  196. package/es6/pdf-viewer-canvas/view-layers/AnnotationSelectionLayer.js +452 -0
  197. package/es6/pdf-viewer-canvas/view-layers/BusyStateLayer.d.ts +9 -0
  198. package/es6/pdf-viewer-canvas/view-layers/BusyStateLayer.js +25 -0
  199. package/es6/pdf-viewer-canvas/view-layers/PdfDocumentLayer.d.ts +10 -0
  200. package/es6/pdf-viewer-canvas/view-layers/PdfDocumentLayer.js +149 -0
  201. package/es6/pdf-viewer-canvas/view-layers/ScrollLayer.d.ts +48 -0
  202. package/es6/pdf-viewer-canvas/view-layers/ScrollLayer.js +308 -0
  203. package/es6/pdf-viewer-canvas/view-layers/TextSelectionLayer.d.ts +19 -0
  204. package/es6/pdf-viewer-canvas/view-layers/TextSelectionLayer.js +289 -0
  205. package/es6/pdf-viewer-canvas/view-layers/ViewLayerBase.d.ts +31 -0
  206. package/es6/pdf-viewer-canvas/view-layers/ViewLayerBase.js +106 -0
  207. package/es6/pdf-viewer-canvas/view-layers/canvasShapes.d.ts +11 -0
  208. package/es6/pdf-viewer-canvas/view-layers/canvasShapes.js +149 -0
  209. package/es6/pdf-viewer-canvas/view-layers/canvasUtlis.d.ts +3 -0
  210. package/es6/pdf-viewer-canvas/view-layers/canvasUtlis.js +10 -0
  211. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationBorder.d.ts +52 -0
  212. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationBorder.js +377 -0
  213. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationContextBar.d.ts +47 -0
  214. package/es6/pdf-viewer-canvas/view-layers/views/AnnotationContextBar.js +102 -0
  215. package/es6/pdf-viewer-canvas/view-layers/views/TextSelectionContextBar.d.ts +14 -0
  216. package/es6/pdf-viewer-canvas/view-layers/views/TextSelectionContextBar.js +36 -0
  217. package/es6/pdf-viewing/PdfViewing.d.ts +4865 -0
  218. package/es6/pdf-viewing/PdfViewing.js +9611 -0
  219. package/es6/pdf-web-viewer/PdfWebViewer.d.ts +372 -0
  220. package/es6/pdf-web-viewer/PdfWebViewer.js +1386 -0
  221. package/es6/pdf-web-viewer/UserSettings.d.ts +8 -0
  222. package/es6/pdf-web-viewer/UserSettings.js +40 -0
  223. package/es6/pdf-web-viewer/WebViewerOptions.d.ts +387 -0
  224. package/es6/pdf-web-viewer/WebViewerOptions.js +582 -0
  225. package/es6/pdf-web-viewer/state/index.d.ts +80 -0
  226. package/es6/pdf-web-viewer/state/index.js +98 -0
  227. package/es6/pdf-web-viewer/state/layout.d.ts +24 -0
  228. package/es6/pdf-web-viewer/state/layout.js +21 -0
  229. package/es6/pdf-web-viewer/state/mobile.d.ts +16 -0
  230. package/es6/pdf-web-viewer/state/mobile.js +11 -0
  231. package/es6/pdf-web-viewer/state/navigationPanel.d.ts +61 -0
  232. package/es6/pdf-web-viewer/state/navigationPanel.js +84 -0
  233. package/es6/pdf-web-viewer/state/passwordForm.d.ts +18 -0
  234. package/es6/pdf-web-viewer/state/passwordForm.js +21 -0
  235. package/es6/pdf-web-viewer/state/pdfDocument.d.ts +31 -0
  236. package/es6/pdf-web-viewer/state/pdfDocument.js +41 -0
  237. package/es6/pdf-web-viewer/state/search.d.ts +29 -0
  238. package/es6/pdf-web-viewer/state/search.js +23 -0
  239. package/es6/pdf-web-viewer/views/App.d.ts +4 -0
  240. package/es6/pdf-web-viewer/views/App.js +19 -0
  241. package/es6/pdf-web-viewer/views/CustomButtons.d.ts +9 -0
  242. package/es6/pdf-web-viewer/views/CustomButtons.js +18 -0
  243. package/es6/pdf-web-viewer/views/DropZone.d.ts +9 -0
  244. package/es6/pdf-web-viewer/views/DropZone.js +53 -0
  245. package/es6/pdf-web-viewer/views/Layout.d.ts +4 -0
  246. package/es6/pdf-web-viewer/views/Layout.js +22 -0
  247. package/es6/pdf-web-viewer/views/annotationbar/Annotationbar.d.ts +4 -0
  248. package/es6/pdf-web-viewer/views/annotationbar/Annotationbar.js +21 -0
  249. package/es6/pdf-web-viewer/views/appbar/AddonsToolbar.d.ts +4 -0
  250. package/es6/pdf-web-viewer/views/appbar/AddonsToolbar.js +35 -0
  251. package/es6/pdf-web-viewer/views/appbar/AnnotationsMenu.d.ts +4 -0
  252. package/es6/pdf-web-viewer/views/appbar/AnnotationsMenu.js +22 -0
  253. package/es6/pdf-web-viewer/views/appbar/AppBar.d.ts +4 -0
  254. package/es6/pdf-web-viewer/views/appbar/AppBar.js +26 -0
  255. package/es6/pdf-web-viewer/views/appbar/DocumentBar.d.ts +4 -0
  256. package/es6/pdf-web-viewer/views/appbar/DocumentBar.js +36 -0
  257. package/es6/pdf-web-viewer/views/appbar/Menu.d.ts +4 -0
  258. package/es6/pdf-web-viewer/views/appbar/Menu.js +80 -0
  259. package/es6/pdf-web-viewer/views/appbar/NavigationBar.d.ts +4 -0
  260. package/es6/pdf-web-viewer/views/appbar/NavigationBar.js +74 -0
  261. package/es6/pdf-web-viewer/views/appbar/SearchBar.d.ts +4 -0
  262. package/es6/pdf-web-viewer/views/appbar/SearchBar.js +83 -0
  263. package/es6/pdf-web-viewer/views/appbar/SearchOptions.d.ts +10 -0
  264. package/es6/pdf-web-viewer/views/appbar/SearchOptions.js +55 -0
  265. package/es6/pdf-web-viewer/views/appbar/ViewBar.d.ts +4 -0
  266. package/es6/pdf-web-viewer/views/appbar/ViewBar.js +52 -0
  267. package/es6/pdf-web-viewer/views/appbar/ZoomBar.d.ts +4 -0
  268. package/es6/pdf-web-viewer/views/appbar/ZoomBar.js +18 -0
  269. package/es6/pdf-web-viewer/views/modal/ApplicationError.d.ts +4 -0
  270. package/es6/pdf-web-viewer/views/modal/ApplicationError.js +25 -0
  271. package/es6/pdf-web-viewer/views/modal/LoadApplication.d.ts +3 -0
  272. package/es6/pdf-web-viewer/views/modal/LoadApplication.js +6 -0
  273. package/es6/pdf-web-viewer/views/modal/LoadFile.d.ts +3 -0
  274. package/es6/pdf-web-viewer/views/modal/LoadFile.js +10 -0
  275. package/es6/pdf-web-viewer/views/modal/Modal.d.ts +4 -0
  276. package/es6/pdf-web-viewer/views/modal/Modal.js +39 -0
  277. package/es6/pdf-web-viewer/views/modal/OpenFile.d.ts +4 -0
  278. package/es6/pdf-web-viewer/views/modal/OpenFile.js +30 -0
  279. package/es6/pdf-web-viewer/views/modal/OpenFileError.d.ts +4 -0
  280. package/es6/pdf-web-viewer/views/modal/OpenFileError.js +13 -0
  281. package/es6/pdf-web-viewer/views/modal/PasswordForm.d.ts +4 -0
  282. package/es6/pdf-web-viewer/views/modal/PasswordForm.js +54 -0
  283. package/es6/pdf-web-viewer/views/modal/SaveFile.d.ts +4 -0
  284. package/es6/pdf-web-viewer/views/modal/SaveFile.js +10 -0
  285. package/es6/pdf-web-viewer/views/modal/UnsavedChanges.d.ts +4 -0
  286. package/es6/pdf-web-viewer/views/modal/UnsavedChanges.js +32 -0
  287. package/es6/pdf-web-viewer/views/navigation/AnnotationList.d.ts +8 -0
  288. package/es6/pdf-web-viewer/views/navigation/AnnotationList.js +26 -0
  289. package/es6/pdf-web-viewer/views/navigation/AnnotationListItem.d.ts +8 -0
  290. package/es6/pdf-web-viewer/views/navigation/AnnotationListItem.js +158 -0
  291. package/es6/pdf-web-viewer/views/navigation/AnnotationNavigation.d.ts +4 -0
  292. package/es6/pdf-web-viewer/views/navigation/AnnotationNavigation.js +11 -0
  293. package/es6/pdf-web-viewer/views/navigation/NavigationPanel.d.ts +4 -0
  294. package/es6/pdf-web-viewer/views/navigation/NavigationPanel.js +50 -0
  295. package/es6/pdf-web-viewer/views/navigation/OutlineList.d.ts +12 -0
  296. package/es6/pdf-web-viewer/views/navigation/OutlineList.js +19 -0
  297. package/es6/pdf-web-viewer/views/navigation/OutlineNavigation.d.ts +4 -0
  298. package/es6/pdf-web-viewer/views/navigation/OutlineNavigation.js +10 -0
  299. package/es6/pdf-web-viewer/views/navigation/ThumbnailNavigation.d.ts +16 -0
  300. package/es6/pdf-web-viewer/views/navigation/ThumbnailNavigation.js +32 -0
  301. package/package.json +24 -0
  302. package/pdfwebviewer/PdfViewing.data +0 -0
  303. package/pdfwebviewer/PdfViewing_Main.js +1 -0
  304. package/pdfwebviewer/PdfViewing_Main.wasm +0 -0
  305. package/pdfwebviewer/PdfViewing_Worker.js +1 -0
  306. package/pdfwebviewer/PdfViewing_Worker.wasm +0 -0
  307. package/pdfwebviewer/pdf-web-viewer.css +2407 -0
  308. package/pdfwebviewer/pdf-web-viewer.development.js +25955 -0
  309. package/pdfwebviewer/pdf-web-viewer.min.js +1 -0
  310. package/pdfwebviewer/translations.de.json +151 -0
  311. package/pdfwebviewer/translations.en.json +151 -0
  312. package/pdfwebviewer/translations.fr.json +151 -0
  313. package/pdfwebviewer/translations.it.json +151 -0
  314. package/scss/common/_breakpoints.scss +44 -0
  315. package/scss/common/_buttons.scss +42 -0
  316. package/scss/common/_colorpicker.scss +89 -0
  317. package/scss/common/_common.scss +21 -0
  318. package/scss/common/_contextbar.scss +44 -0
  319. package/scss/common/_dropdown.scss +176 -0
  320. package/scss/common/_icon.scss +9 -0
  321. package/scss/common/_index.scss +19 -0
  322. package/scss/common/_loader.scss +30 -0
  323. package/scss/common/_rangeslider.scss +24 -0
  324. package/scss/common/_scrollbars.scss +64 -0
  325. package/scss/common/_stroke-style-picker.scss +64 -0
  326. package/scss/common/_stroke-width-picker.scss +23 -0
  327. package/scss/common/_toolbar.scss +117 -0
  328. package/scss/common/_tooltip.scss +39 -0
  329. package/scss/modules/_eraser.scss +28 -0
  330. package/scss/modules/_forms.scss +56 -0
  331. package/scss/modules/_highlightannotation.scss +12 -0
  332. package/scss/modules/_index.scss +5 -0
  333. package/scss/modules/_inkannotation.scss +41 -0
  334. package/scss/modules/_stampannotation.scss +19 -0
  335. package/scss/pdf-viewer-canvas/_annotationborder.scss +107 -0
  336. package/scss/pdf-viewer-canvas/_busy-loader.scss +53 -0
  337. package/scss/pdf-viewer-canvas/_freetexteditor.scss +28 -0
  338. package/scss/pdf-viewer-canvas/_index.scss +7 -0
  339. package/scss/pdf-viewer-canvas/_layout.scss +52 -0
  340. package/scss/pdf-viewer-canvas/_popup.scss +217 -0
  341. package/scss/pdf-viewer-canvas/_printservice.scss +171 -0
  342. package/scss/pdf-viewer-canvas/_textselection.scss +17 -0
  343. package/scss/pdf-web-viewer/_annotationbar.scss +47 -0
  344. package/scss/pdf-web-viewer/_index.scss +8 -0
  345. package/scss/pdf-web-viewer/_layout.scss +63 -0
  346. package/scss/pdf-web-viewer/_modal.scss +186 -0
  347. package/scss/pdf-web-viewer/_navigationpanel.scss +398 -0
  348. package/scss/pdf-web-viewer/_searchbar.scss +47 -0
  349. package/scss/pdf-web-viewer/_toolbar.scss +134 -0
  350. package/scss/pdf-web-viewer/_viewer.scss +54 -0
  351. package/scss/pdf-web-viewer.scss +1 -0
  352. package/scss/themes/default/_light.scss +32 -0
  353. package/scss/themes/default/_mixins.scss +129 -0
  354. package/scss/themes/default/_theme.scss +161 -0
  355. package/scss/themes/pdf-web-viewer.scss +1 -0
  356. package/umd/pdf-web-viewer.development.js +25955 -0
  357. package/umd/pdf-web-viewer.development.js.map +1 -0
  358. package/umd/pdf-web-viewer.min.js +1 -0
  359. package/wasm/PdfViewing.data +0 -0
  360. package/wasm/PdfViewing_Main.js +1 -0
  361. package/wasm/PdfViewing_Main.wasm +0 -0
  362. package/wasm/PdfViewing_Worker.js +1 -0
  363. package/wasm/PdfViewing_Worker.wasm +0 -0
  364. package/wasm/translations.de.json +151 -0
  365. package/wasm/translations.en.json +151 -0
  366. package/wasm/translations.fr.json +151 -0
  367. package/wasm/translations.it.json +151 -0
@@ -0,0 +1,4865 @@
1
+ export declare namespace PdfViewing {
2
+ export namespace Internal {
3
+ abstract class NativeBase {
4
+ }
5
+ abstract class NativeObject extends NativeBase {
6
+ equals(obj: object): boolean;
7
+ getHashCode(): number;
8
+ }
9
+ }
10
+ export class PdfViewingError extends Error {
11
+ constructor(message?: string);
12
+ }
13
+ /**
14
+ *
15
+ * Specifies functional features which can be supported by the ViewingSDK.
16
+ * A given license key can permit or prohibit any of these features.
17
+ */
18
+ export enum LicenseFeature {
19
+ /**
20
+ *
21
+ * Viewer may create and edit annotations.
22
+ */
23
+ Annotate = 1,
24
+ /**
25
+ *
26
+ * Viewer may fill out form fields.
27
+ */
28
+ FillFormFields = 2,
29
+ /**
30
+ *
31
+ * Viewer may rotate individual pages.
32
+ */
33
+ PageRotation = 4
34
+ }
35
+ export interface ViewingViewerControllerEventMap {
36
+ /**
37
+ *
38
+ * Event is raised when the PdfViewingSDK started or ended a busy period.
39
+ * This can be used to indicate to the user that the ViewingSDK is currently processing and visual updates will be incoming soon.
40
+ *
41
+ * Whether the PdfViewingSDK is now newly busy or not.
42
+ */
43
+ busyChanged: boolean;
44
+ /**
45
+ *
46
+ * An internal Error has occured. Asynchronous internal functionality that is not directly controlled at the interface such as rendering will report any internal errors with this event.
47
+ */
48
+ errorOccured: void;
49
+ }
50
+ export type ViewingViewerControllerEventListener = <K extends keyof ViewingViewerControllerEventMap>(e: ViewingViewerControllerEventMap[K]) => void;
51
+ export type ViewingViewerControllerEventTypes = keyof ViewingViewerControllerEventMap;
52
+ /**
53
+ *
54
+ */
55
+ export class ViewerController extends Internal.NativeObject {
56
+ private eventListeners;
57
+ /**
58
+ * @event
59
+ */
60
+ addEventListener<K extends keyof ViewingViewerControllerEventMap>(type: K, listener: (e: ViewingViewerControllerEventMap[K]) => void): void;
61
+ removeEventListener<K extends keyof ViewingViewerControllerEventMap>(type: K, listener: (e: ViewingViewerControllerEventMap[K]) => void): void;
62
+ /**
63
+ *
64
+ *
65
+ * @throws {@link PdfViewing.LicenseError} The license is not valid.
66
+ */
67
+ constructor();
68
+ /**
69
+ * Close the object
70
+ *
71
+ * Release all native resources associated with the object.
72
+ */
73
+ close(): void;
74
+ /**
75
+ *
76
+ * Open a PDF and optionally one or more associated FDFs.
77
+ * @param pdfFile
78
+ * The PDF file to be opened.
79
+ * @param fdfFiles
80
+ * A list of FDF or XFDF files that are opened jointly with the {@link PdfViewing.ViewerController.open pdfFile}.
81
+ * @param password
82
+ * The password used for opening the {@link PdfViewing.ViewerController.open pdfFile}.
83
+ * Set `null` if unencrypted.
84
+ * @returns
85
+ * The document that has been opened.
86
+ *
87
+ * @throws {@link PdfViewing.PasswordError} The file from {@link PdfViewing.ViewerController.open pdfFile} is encrypted and the password is not valid.
88
+ * @throws {@link PdfViewing.IOError} Error reading from a stream.
89
+ * @throws {@link PdfViewing.CorruptError} The file from {@link PdfViewing.ViewerController.open pdfFile} is corrupt or not a PDF.
90
+ * @throws {@link PdfViewing.NotFoundError} The file from {@link PdfViewing.ViewerController.open pdfFile} is missing.
91
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed.
92
+ */
93
+ open(pdfFile: PdfViewing.IO.InputDocument, fdfFiles?: PdfViewing.IO.InputDocumentList | null, password?: string | null): Promise<PdfViewing.Pdf.Document>;
94
+ private openCallback;
95
+ /**
96
+ *
97
+ * @param pdf
98
+ * @param fdf
99
+ * @param password
100
+ * the password to open the PDF document
101
+ * @returns
102
+ * The document that has been opened.
103
+ *
104
+ * @throws {@link PdfViewing.PasswordError} The file is encrypted and the password is not valid.
105
+ * @throws {@link PdfViewing.CorruptError} The file is corrupt or not a PDF.
106
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
107
+ *
108
+ * @deprecated Deprecated in Version 3.11. Use Open method instead.
109
+ */
110
+ openMem(pdf: Uint8Array, fdf: Uint8Array | null, password: string | null): Promise<PdfViewing.Pdf.Document>;
111
+ private openMemCallback;
112
+ /**
113
+ *
114
+ * @param pdfUri
115
+ * @param fdfUri
116
+ * @param password
117
+ * the password to open the PDF document
118
+ * @param pdfAuthorization
119
+ * @param fdfAuthorization
120
+ * @returns
121
+ * The document that has been opened.
122
+ *
123
+ * @throws {@link PdfViewing.PasswordError} The file is encrypted and the password is not valid.
124
+ * @throws {@link PdfViewing.CorruptError} The file is corrupt or not a PDF.
125
+ * @throws {@link PdfViewing.NotFoundError} The file from {@link PdfViewing.ViewerController.openUri pdfUri} or {@link PdfViewing.ViewerController.openUri fdfUri} is missing.
126
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
127
+ *
128
+ * @deprecated Deprecated in Version 3.11. Use Open method instead.
129
+ */
130
+ openUri(pdfUri: string, fdfUri: string | null, password: string | null, pdfAuthorization: string | null, fdfAuthorization: string | null): Promise<PdfViewing.Pdf.Document>;
131
+ private openUriCallback;
132
+ /**
133
+ *
134
+ * Merge two input documents into one document.
135
+ * @param first
136
+ * The first PDF document. This document is the parent document. It's metadata and viewing properties will be used.
137
+ * @param second
138
+ * The second PDF document. It's pages will be appended to {@link PdfViewing.ViewerController.merge first}
139
+ * @param firstDocumentPassword
140
+ * The password for the first PDF document.
141
+ * @param secondDocumentPassword
142
+ * The password for the second PDF document.
143
+ * @param mergeOptions
144
+ * Document merge options.
145
+ * @returns
146
+ * Binary buffer containing the new document.
147
+ *
148
+ * @throws {@link PdfViewing.PasswordError} Either {@link PdfViewing.ViewerController.merge first} or {@link PdfViewing.ViewerController.merge second} is encrypted and the password is not valid.
149
+ * @throws {@link PdfViewing.IOError} Error reading from a stream.
150
+ * @throws {@link PdfViewing.CorruptError} Either {@link PdfViewing.ViewerController.merge first} or {@link PdfViewing.ViewerController.merge second} is corrupt or not a PDF.
151
+ * @throws {@link PdfViewing.NotFoundError} Either {@link PdfViewing.ViewerController.merge first} or {@link PdfViewing.ViewerController.merge second} is missing.
152
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed.
153
+ */
154
+ merge(first: PdfViewing.IO.InputDocument, second: PdfViewing.IO.InputDocument, firstDocumentPassword?: string | null, secondDocumentPassword?: string | null, mergeOptions?: PdfViewing.IO.MergeOptions | null): Promise<PdfViewing.Pdf.Content.BinaryBuffer>;
155
+ private mergeCallback;
156
+ /**
157
+ * True if viewer is currently still processing any the latest inputs and some updates to the viewport are incoming.
158
+ *
159
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
160
+ */
161
+ get isBusy(): boolean;
162
+ /**
163
+ * Set how formfields highlights are colored.
164
+ * Use a fully transparent color to disable highlighting.
165
+ *
166
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
167
+ */
168
+ set formsHighlightColor(formsHighlightColor: PdfViewing.Pdf.Annotations.Color);
169
+ /**
170
+ * Set how required formfields highlights are colored.
171
+ * Use a fully transparent color to disable highlighting.
172
+ *
173
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
174
+ */
175
+ set formsHighlightRequiredColor(formsHighlightRequiredColor: PdfViewing.Pdf.Annotations.Color);
176
+ }
177
+ /**
178
+ *
179
+ */
180
+ export class Sdk extends Internal.NativeObject {
181
+ /**
182
+ *
183
+ * @param license
184
+ * Pass the license key to activate the product.
185
+ * An empty string may be passed to use a default license which will watermark all pages.
186
+ * @param producerSuffix
187
+ *
188
+ * @throws {@link PdfViewing.UnknownFormatError} if the format (version) of the {@link PdfViewing.Sdk.initialize license} argument is unknown
189
+ * @throws {@link PdfViewing.CorruptError} if the {@link PdfViewing.Sdk.initialize license} argument is not a correct license key
190
+ * @throws {@link PdfViewing.LicenseError} if the {@link PdfViewing.Sdk.initialize license} argument can be read but the license check failed
191
+ */
192
+ static initialize(license: string, producerSuffix: string | null): void;
193
+ /**
194
+ *
195
+ */
196
+ static get version(): string;
197
+ /**
198
+ *
199
+ */
200
+ static get producerFullName(): string;
201
+ /**
202
+ * Returns a bitfield describing which features are supported with the currently set license
203
+ */
204
+ static get supportedFeatures(): PdfViewing.LicenseFeature;
205
+ }
206
+ /**
207
+ *
208
+ */
209
+ export class IntegerSet extends Internal.NativeObject implements Set<number> {
210
+ private nativeGet;
211
+ [Symbol.iterator](): IterableIterator<number>;
212
+ clear(): void;
213
+ delete(value: number): boolean;
214
+ forEach(callbackfn: (value: number, value2: number, set: Set<number>) => void, thisArg?: any): void;
215
+ has(value: number): boolean;
216
+ add(value: number): this;
217
+ get size(): number;
218
+ entries(): IterableIterator<[number, number]>;
219
+ keys(): IterableIterator<number>;
220
+ values(): IterableIterator<number>;
221
+ [Symbol.toStringTag]: string;
222
+ }
223
+ /**
224
+ *
225
+ * A list of strings
226
+ */
227
+ export class StringList extends Internal.NativeObject implements List<string> {
228
+ remove(element: string): boolean;
229
+ add(element: string): boolean;
230
+ addRange(inputList: StringList): boolean;
231
+ set(index: number, element: string): void;
232
+ clear(): void;
233
+ get(index: number): string;
234
+ getRange(index: number, count: number): StringList;
235
+ get size(): number;
236
+ [Symbol.iterator](): Iterator<string>;
237
+ }
238
+ /**
239
+ *
240
+ * A map that maps strings to strings.
241
+ */
242
+ export class StringMap extends Internal.NativeObject implements Map<string, string> {
243
+ private nativeGet;
244
+ [Symbol.iterator](): IterableIterator<[string, string]>;
245
+ clear(): void;
246
+ delete(key: string): boolean;
247
+ forEach(callbackfn: (value: string, key: string, map: Map<string, string>) => void, thisArg?: any): void;
248
+ get(key: string): string;
249
+ has(key: string): boolean;
250
+ set(key: string, value: string): this;
251
+ get size(): number;
252
+ entries(): IterableIterator<[string, string]>;
253
+ keys(): IterableIterator<string>;
254
+ values(): IterableIterator<string>;
255
+ [Symbol.toStringTag]: string;
256
+ }
257
+ export namespace IO {
258
+ /**
259
+ *
260
+ * Describes the type of the file.
261
+ */
262
+ enum FileType {
263
+ /**
264
+ *
265
+ * A PDF file contains all content.
266
+ */
267
+ Pdf = 0,
268
+ /**
269
+ *
270
+ * A FDF file may only contain annotations and form fields.
271
+ */
272
+ Fdf = 1
273
+ }
274
+ /**
275
+ *
276
+ * A PDF, FDF or XFDF File
277
+ */
278
+ class InputDocument extends Internal.NativeObject {
279
+ /**
280
+ * Tag that identifies annotations coming from present document (PDF, FDF or XFDF).
281
+ * The tag for an annotation can be retrieved by {@link PdfViewing.Pdf.Annotations.Annotation.sourceTag }.
282
+ */
283
+ get sourceTag(): string | null;
284
+ }
285
+ /**
286
+ *
287
+ * A file that can be opened on a text-uri.
288
+ */
289
+ class InputUri extends PdfViewing.IO.InputDocument {
290
+ /**
291
+ *
292
+ * @param uri
293
+ * The uri where the file can be loaded from.
294
+ * @param httpOptions
295
+ * Contains custom settings that one wants to apply to the HTTP request.
296
+ * @param sourceTag
297
+ * Tag that identifies annotations coming from present document (PDF, FDF or XFDF).
298
+ * The tag for an annotation can be retrieved by {@link PdfViewing.Pdf.Annotations.Annotation.sourceTag }.
299
+ *
300
+ * @throws {@link PdfViewing.InvalidOperationError} if the file is an encrypted FDF or XFDF.
301
+ */
302
+ constructor(uri: string, httpOptions?: PdfViewing.IO.HttpOptions | null, sourceTag?: string | null);
303
+ /**
304
+ * Get uri where this file is loaded from.
305
+ */
306
+ get uri(): string;
307
+ }
308
+ /**
309
+ *
310
+ */
311
+ class InputFile extends PdfViewing.IO.InputDocument {
312
+ /**
313
+ *
314
+ * @param data
315
+ * The byte array containing the file in memory.
316
+ * @param sourceTag
317
+ * Tag that identifies annotations coming from present document (PDF, FDF or XFDF).
318
+ * The tag for an annotation can be retrieved by {@link PdfViewing.Pdf.Annotations.Annotation.sourceTag }.
319
+ *
320
+ * @throws {@link PdfViewing.InvalidOperationError} if the file is an encrypted FDF or XFDF.
321
+ */
322
+ constructor(data: Uint8Array, sourceTag?: string | null);
323
+ /**
324
+ * Get byte array containing the file in memory.
325
+ */
326
+ get data(): Uint8Array;
327
+ }
328
+ /**
329
+ *
330
+ * A list of files
331
+ */
332
+ class InputDocumentList extends Internal.NativeObject implements List<PdfViewing.IO.InputDocument> {
333
+ /**
334
+ *
335
+ */
336
+ constructor();
337
+ remove(element: PdfViewing.IO.InputDocument): boolean;
338
+ add(element: PdfViewing.IO.InputDocument): boolean;
339
+ addRange(inputList: InputDocumentList): boolean;
340
+ set(index: number, element: PdfViewing.IO.InputDocument): void;
341
+ clear(): void;
342
+ get(index: number): PdfViewing.IO.InputDocument;
343
+ getRange(index: number, count: number): InputDocumentList;
344
+ get size(): number;
345
+ [Symbol.iterator](): Iterator<PdfViewing.IO.InputDocument>;
346
+ }
347
+ /**
348
+ *
349
+ * Contains options that are applied to a HTTP request.
350
+ */
351
+ class HttpOptions extends Internal.NativeObject {
352
+ /**
353
+ *
354
+ */
355
+ constructor();
356
+ /**
357
+ * The mode for the request, possible values among others:
358
+ * - "cors"
359
+ * - "no-cors"
360
+ * - "same-origin"
361
+ */
362
+ get mode(): string | null;
363
+ /**
364
+ * The mode for the request, possible values among others:
365
+ * - "cors"
366
+ * - "no-cors"
367
+ * - "same-origin"
368
+ */
369
+ set mode(mode: string | null);
370
+ /**
371
+ * A string indicating how the request will interact with the browser's HTTP cache.
372
+ * The possible values are:
373
+ * - "default"
374
+ * - "no-store"
375
+ * - "reload"
376
+ * - "no-cache"
377
+ * - "force-cache"
378
+ * - "only-if-cached"
379
+ */
380
+ get cache(): string | null;
381
+ /**
382
+ * A string indicating how the request will interact with the browser's HTTP cache.
383
+ * The possible values are:
384
+ * - "default"
385
+ * - "no-store"
386
+ * - "reload"
387
+ * - "no-cache"
388
+ * - "force-cache"
389
+ * - "only-if-cached"
390
+ */
391
+ set cache(cache: string | null);
392
+ /**
393
+ * Controls what browsers do with credentials (i.e. cookies, HTTP authentication entries, and TLS client certificates).
394
+ * Default value is "same-origin".
395
+ * Must be one of the following strings:
396
+ * - "omit": Tells browsers to exclude credentials from the request, and ignore any credentials sent back in the response (e.g., any Set-Cookie header).
397
+ * - "same-origin": Tells browsers to include credentials with requests to same-origin URLs, and use any credentials sent back in responses from same-origin URLs.
398
+ * - "include": Tells browsers to include credentials in both same- and cross-origin requests, and always use any credentials sent back in responses.
399
+ */
400
+ get credentials(): string | null;
401
+ /**
402
+ * Controls what browsers do with credentials (i.e. cookies, HTTP authentication entries, and TLS client certificates).
403
+ * Default value is "same-origin".
404
+ * Must be one of the following strings:
405
+ * - "omit": Tells browsers to exclude credentials from the request, and ignore any credentials sent back in the response (e.g., any Set-Cookie header).
406
+ * - "same-origin": Tells browsers to include credentials with requests to same-origin URLs, and use any credentials sent back in responses from same-origin URLs.
407
+ * - "include": Tells browsers to include credentials in both same- and cross-origin requests, and always use any credentials sent back in responses.
408
+ */
409
+ set credentials(credentials: string | null);
410
+ /**
411
+ * Specify how to handle the response.
412
+ * Default value is "follow".
413
+ * Possible values are:
414
+ * - "follow": Automatically follow redirects.
415
+ * - "error": Abort with an error if a redirect occurs.
416
+ * - "manual": Caller intends to process the response in another context.
417
+ */
418
+ get redirect(): string | null;
419
+ /**
420
+ * Specify how to handle the response.
421
+ * Default value is "follow".
422
+ * Possible values are:
423
+ * - "follow": Automatically follow redirects.
424
+ * - "error": Abort with an error if a redirect occurs.
425
+ * - "manual": Caller intends to process the response in another context.
426
+ */
427
+ set redirect(redirect: string | null);
428
+ /**
429
+ * Specifies the referrer policy to use for the request.
430
+ * Possible values are:
431
+ * - "no-referrer"
432
+ * - "no-referrer-when-downgrade"
433
+ * - "same-origin"
434
+ * - "origin"
435
+ * - "strict-origin"
436
+ * - "origin-when-cross-origin"
437
+ * - "strict-origin-when-cross-origin"
438
+ * - "unsafe-url"
439
+ */
440
+ get referrerPolicy(): string | null;
441
+ /**
442
+ * Specifies the referrer policy to use for the request.
443
+ * Possible values are:
444
+ * - "no-referrer"
445
+ * - "no-referrer-when-downgrade"
446
+ * - "same-origin"
447
+ * - "origin"
448
+ * - "strict-origin"
449
+ * - "origin-when-cross-origin"
450
+ * - "strict-origin-when-cross-origin"
451
+ * - "unsafe-url"
452
+ */
453
+ set referrerPolicy(referrerPolicy: string | null);
454
+ /**
455
+ * Headers to be added to the request.
456
+ */
457
+ get headers(): PdfViewing.StringMap;
458
+ }
459
+ /**
460
+ *
461
+ * Contains options for merging two PDF documents into one.
462
+ */
463
+ class MergeOptions extends Internal.NativeObject {
464
+ /**
465
+ *
466
+ */
467
+ constructor();
468
+ /**
469
+ * Copy links (document internal and external links).
470
+ */
471
+ get copyLinks(): boolean;
472
+ /**
473
+ * Copy links (document internal and external links).
474
+ */
475
+ set copyLinks(copyLinks: boolean);
476
+ /**
477
+ * Copy interactive annotations such as sticky notes or highlight annotations.
478
+ */
479
+ get copyAnnotations(): boolean;
480
+ /**
481
+ * Copy interactive annotations such as sticky notes or highlight annotations.
482
+ */
483
+ set copyAnnotations(copyAnnotations: boolean);
484
+ /**
485
+ * Copy interactive form fields.
486
+ */
487
+ get copyFormFields(): boolean;
488
+ /**
489
+ * Copy interactive form fields.
490
+ */
491
+ set copyFormFields(copyFormFields: boolean);
492
+ /**
493
+ * Copy outlines (also called bookmarks).
494
+ */
495
+ get copyOutlines(): boolean;
496
+ /**
497
+ * Copy outlines (also called bookmarks).
498
+ */
499
+ set copyOutlines(copyOutlines: boolean);
500
+ /**
501
+ * Copy logical structure and tagging information.
502
+ */
503
+ get copyLogicalStructure(): boolean;
504
+ /**
505
+ * Copy logical structure and tagging information.
506
+ */
507
+ set copyLogicalStructure(copyLogicalStructure: boolean);
508
+ /**
509
+ * Copy named destinations.
510
+ */
511
+ get copyNamedDestinations(): boolean;
512
+ /**
513
+ * Copy named destinations.
514
+ */
515
+ set copyNamedDestinations(copyNamedDestinations: boolean);
516
+ /**
517
+ * Copy unsigned signature fields.
518
+ */
519
+ get copyUnsignedSignatures(): boolean;
520
+ /**
521
+ * Copy unsigned signature fields.
522
+ */
523
+ set copyUnsignedSignatures(copyUnsignedSignatures: boolean);
524
+ }
525
+ }
526
+ export namespace Pdf {
527
+ /**
528
+ *
529
+ * Declares which kind of changes were done in the document since opening or last save action.
530
+ */
531
+ enum DocumentChange {
532
+ /**
533
+ *
534
+ * Nothing has been changed.
535
+ */
536
+ NoChange = 0,
537
+ /**
538
+ *
539
+ * Some annotations have been created, edited or deleted and the containing files need to be saved.
540
+ */
541
+ Annotation = 1,
542
+ /**
543
+ *
544
+ * Some content has been edited and the PDF needs to be saved.
545
+ */
546
+ Content = 2
547
+ }
548
+ /**
549
+ *
550
+ * The claimed standard compliance of the PDF document.
551
+ */
552
+ enum Compliance {
553
+ /**
554
+ *
555
+ * Unkown claimed compliance
556
+ */
557
+ Unknown = 0,
558
+ /**
559
+ *
560
+ * PDF 1.0
561
+ */
562
+ Pdf10 = 1,
563
+ /**
564
+ *
565
+ * PDF 1.1
566
+ */
567
+ Pdf11 = 2,
568
+ /**
569
+ *
570
+ * PDF 1.2
571
+ */
572
+ Pdf12 = 3,
573
+ /**
574
+ *
575
+ * PDF 1.3
576
+ */
577
+ Pdf13 = 4,
578
+ /**
579
+ *
580
+ * PDF 1.4
581
+ */
582
+ Pdf14 = 5,
583
+ /**
584
+ *
585
+ * PDF 1.5
586
+ */
587
+ Pdf15 = 6,
588
+ /**
589
+ *
590
+ * PDF 1.6
591
+ */
592
+ Pdf16 = 7,
593
+ /**
594
+ *
595
+ * PDF 1.7
596
+ */
597
+ Pdf17 = 8,
598
+ /**
599
+ *
600
+ * PDF 2.0
601
+ */
602
+ Pdf20 = 9,
603
+ /**
604
+ *
605
+ * PDF/A-1
606
+ */
607
+ PdfA1b = 10,
608
+ /**
609
+ *
610
+ * PDF/A-1a
611
+ */
612
+ PdfA1a = 11,
613
+ /**
614
+ *
615
+ * PDF/A-2b
616
+ */
617
+ PdfA2b = 12,
618
+ /**
619
+ *
620
+ * PDF/A-2u
621
+ */
622
+ PdfA2u = 13,
623
+ /**
624
+ *
625
+ * PDF/A-2a
626
+ */
627
+ PdfA2a = 14,
628
+ /**
629
+ *
630
+ * PDF/A-3b
631
+ */
632
+ PdfA3b = 15,
633
+ /**
634
+ *
635
+ * PDF/A-3u
636
+ */
637
+ PdfA3u = 16,
638
+ /**
639
+ *
640
+ * PDF/A-3a
641
+ */
642
+ PdfA3a = 17
643
+ }
644
+ /**
645
+ *
646
+ * The intended target for rendering.
647
+ */
648
+ enum OutputMedium {
649
+ /**
650
+ *
651
+ * Show rendered output on a display.
652
+ */
653
+ Display = 0,
654
+ /**
655
+ *
656
+ * Print rendered output onto paper.
657
+ */
658
+ Print = 1
659
+ }
660
+ /**
661
+ *
662
+ * Options used for rendering pages.
663
+ */
664
+ class RenderOptions extends Internal.NativeObject {
665
+ /**
666
+ *
667
+ */
668
+ constructor();
669
+ /**
670
+ * Color of form field highlights.
671
+ * By default a light blue color is used.
672
+ * Use a fully transparent color to disable highlighting.
673
+ */
674
+ get formFieldHighlightColor(): PdfViewing.Pdf.Annotations.Color;
675
+ /**
676
+ * Color of form field highlights.
677
+ * By default a light blue color is used.
678
+ * Use a fully transparent color to disable highlighting.
679
+ */
680
+ set formFieldHighlightColor(formFieldHighlightColor: PdfViewing.Pdf.Annotations.Color);
681
+ /**
682
+ * Color of form field highlights for required fields.
683
+ * By default a red color is used.
684
+ * Use a fully transparent color to disable highlighting of required fields.
685
+ */
686
+ get formFieldRequiredHighlightColor(): PdfViewing.Pdf.Annotations.Color;
687
+ /**
688
+ * Color of form field highlights for required fields.
689
+ * By default a red color is used.
690
+ * Use a fully transparent color to disable highlighting of required fields.
691
+ */
692
+ set formFieldRequiredHighlightColor(formFieldRequiredHighlightColor: PdfViewing.Pdf.Annotations.Color);
693
+ /**
694
+ * Filter that decides which annotations get rendered.
695
+ * Set `null` to render all Annotations.
696
+ * Default value is `null`.
697
+ */
698
+ set annotationFilter(annotationFilter: PdfViewing.Pdf.Annotations.AnnotationFilter | null);
699
+ /**
700
+ * Set what ouput medium you want to use the rendered images for.
701
+ * Default is "display".
702
+ */
703
+ get outputMedium(): PdfViewing.Pdf.OutputMedium;
704
+ /**
705
+ * Set what ouput medium you want to use the rendered images for.
706
+ * Default is "display".
707
+ */
708
+ set outputMedium(outputMedium: PdfViewing.Pdf.OutputMedium);
709
+ }
710
+ /**
711
+ *
712
+ * Additional settings to configure the initial view
713
+ */
714
+ class ViewOptions extends Internal.NativeObject {
715
+ /**
716
+ *
717
+ */
718
+ constructor();
719
+ /**
720
+ * Destination that the view should initially navigate to.
721
+ */
722
+ get initialDestination(): PdfViewing.Pdf.Navigation.Destination | null;
723
+ /**
724
+ * Destination that the view should initially navigate to.
725
+ */
726
+ set initialDestination(initialDestination: PdfViewing.Pdf.Navigation.Destination | null);
727
+ /**
728
+ * This will override any fitting operation in the given {@link PdfViewing.Pdf.ViewOptions.initialDestination },
729
+ * but preserve the navigation to the target of said destination.
730
+ */
731
+ get initialFitMode(): PdfViewing.Pdf.Navigation.FitMode | null;
732
+ /**
733
+ * This will override any fitting operation in the given {@link PdfViewing.Pdf.ViewOptions.initialDestination },
734
+ * but preserve the navigation to the target of said destination.
735
+ */
736
+ set initialFitMode(initialFitMode: PdfViewing.Pdf.Navigation.FitMode | null);
737
+ /**
738
+ * Set a initial page-layout mode.
739
+ */
740
+ get initialPageLayoutMode(): PdfViewing.Pdf.Navigation.PageLayoutMode | null;
741
+ /**
742
+ * Set a initial page-layout mode.
743
+ */
744
+ set initialPageLayoutMode(initialPageLayoutMode: PdfViewing.Pdf.Navigation.PageLayoutMode | null);
745
+ /**
746
+ * Set an initial viewport size in pixel.
747
+ * Default: 720 (height) and 480 (width).
748
+ */
749
+ get viewportSize(): PdfViewing.Pdf.Geometry.Integer.Size;
750
+ /**
751
+ * Set an initial viewport size in pixel.
752
+ * Default: 720 (height) and 480 (width).
753
+ */
754
+ set viewportSize(viewportSize: PdfViewing.Pdf.Geometry.Integer.Size);
755
+ /**
756
+ * Set an initial resolution in DPI (dots per inch) for this view.
757
+ * Default: 96.0.
758
+ */
759
+ get viewDPI(): number;
760
+ /**
761
+ * Set an initial resolution in DPI (dots per inch) for this view.
762
+ * Default: 96.0.
763
+ */
764
+ set viewDPI(viewDPI: number);
765
+ }
766
+ /**
767
+ *
768
+ * Options used for saving {@link PdfViewing.Pdf.Document }s.
769
+ */
770
+ class SaveOptions extends Internal.NativeObject {
771
+ /**
772
+ *
773
+ */
774
+ constructor();
775
+ /**
776
+ * Choose whether the outputfile should be a PDF or an FDF document.
777
+ * Default is {@link PdfViewing.IO.FileType.Pdf }.
778
+ *
779
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
780
+ */
781
+ get fileType(): PdfViewing.IO.FileType;
782
+ /**
783
+ * Choose whether the outputfile should be a PDF or an FDF document.
784
+ * Default is {@link PdfViewing.IO.FileType.Pdf }.
785
+ *
786
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
787
+ */
788
+ set fileType(fileType: PdfViewing.IO.FileType);
789
+ /**
790
+ * A callback to be called for each annotation in the document when saving.
791
+ * The result of the callback determines whether the annotation is included in the output.
792
+ * Pass `null` to save all annotations.
793
+ * Default is `null`.
794
+ *
795
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
796
+ */
797
+ set annotationFilter(annotationFilter: PdfViewing.Pdf.Annotations.AnnotationFilter | null);
798
+ /**
799
+ * The password to encrypt the saved document.
800
+ * Pass `null` to save without encryption.
801
+ * Default is `null`.
802
+ *
803
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
804
+ */
805
+ set password(password: string | null);
806
+ }
807
+ /**
808
+ *
809
+ */
810
+ class Page extends Internal.NativeObject {
811
+ /**
812
+ * Close the object
813
+ *
814
+ * Release all native resources associated with the object.
815
+ */
816
+ close(): void;
817
+ /**
818
+ *
819
+ * Rotate this page by the specified number of degrees.
820
+ * @param rotateBy
821
+ *
822
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
823
+ * @throws {@link PdfViewing.LicenseError} The license is not valid for the editing feature.
824
+ */
825
+ rotatePage(rotateBy: PdfViewing.Pdf.Geometry.Rotation): void;
826
+ }
827
+ /**
828
+ *
829
+ */
830
+ class PageList extends Internal.NativeObject implements List<PdfViewing.Pdf.Page> {
831
+ /**
832
+ * Close the object
833
+ *
834
+ * Release all native resources associated with the object.
835
+ */
836
+ close(): void;
837
+ remove(element: PdfViewing.Pdf.Page): boolean;
838
+ add(element: PdfViewing.Pdf.Page): boolean;
839
+ addRange(inputList: PageList): boolean;
840
+ set(index: number, element: PdfViewing.Pdf.Page): void;
841
+ clear(): void;
842
+ get(index: number): PdfViewing.Pdf.Page;
843
+ getRange(index: number, count: number): PageList;
844
+ get size(): number;
845
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Page>;
846
+ }
847
+ /**
848
+ *
849
+ * Allows Interacting with an opened document
850
+ */
851
+ class Document extends Internal.NativeObject {
852
+ /**
853
+ * Close the object
854
+ *
855
+ * Release all native resources associated with the object.
856
+ */
857
+ close(): void;
858
+ /**
859
+ *
860
+ * Return the opened PDF as binary data,
861
+ * to be used, e.g., to save the file to disk.
862
+ * @param asFdf
863
+ * @returns
864
+ *
865
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
866
+ * @throws {@link PdfViewing.LicenseError} The license is not valid for this feature.
867
+ *
868
+ * @deprecated Deprecated in Version 3.10. Use method Save instead.
869
+ */
870
+ saveFile(asFdf: boolean): Promise<PdfViewing.Pdf.Content.BinaryBuffer>;
871
+ private saveFileCallback;
872
+ /**
873
+ *
874
+ * Return the opened PDF or FDF as binary data,
875
+ * to be used, e.g., to save the file to disk.
876
+ * @param saveOptions
877
+ * Options used for saving the document.
878
+ * @returns
879
+ *
880
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
881
+ * @throws {@link PdfViewing.NotSupportedError} if trying to save an annotation type to FDF which is currently not supported.
882
+ * Unsupported are: {@link PdfViewing.Pdf.Annotations.FileAttachment }
883
+ * and all derivatives of {@link PdfViewing.Pdf.Annotations.Link } and {@link PdfViewing.Pdf.Forms.Widget }.
884
+ * @throws {@link PdfViewing.LicenseError} The license is not valid for the editing feature.
885
+ */
886
+ save(saveOptions?: PdfViewing.Pdf.SaveOptions | null): Promise<PdfViewing.Pdf.Content.BinaryBuffer>;
887
+ private saveCallback;
888
+ /**
889
+ *
890
+ * Start a new textsearch.
891
+ * All results for the same textsearch can be iterated over using the returned {@link PdfViewing.Pdf.Content.TextSearchIterator }.
892
+ * @param text
893
+ * The text to look for.
894
+ * @param startPage
895
+ * The page on which to start the search.
896
+ * @param isCaseSensitive
897
+ * Set to `true` to ignore whether a letter is uppercase or lowercase.
898
+ * @param isWrappingEnabled
899
+ * Enable continuing search at the other end of the document if one end is reached.
900
+ * @param isRegex
901
+ * Interpret {@link PdfViewing.Pdf.Document.searchText text} as a regular expression according to ECMAScript Regular Expression grammar.
902
+ * @returns
903
+ * The returned {@link PdfViewing.Pdf.Content.TextSearchIterator } is starting the search at the top of the given page.
904
+ *
905
+ * @throws {@link PdfViewing.ArgumentError} if an empty string is given as a search term
906
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
907
+ */
908
+ searchText(text: string, startPage: number, isCaseSensitive: boolean, isWrappingEnabled: boolean, isRegex: boolean): PdfViewing.Pdf.Content.TextSearchIterator;
909
+ /**
910
+ *
911
+ * Create a new {@link PdfViewing.Pdf.Annotations.Annotation } and add it to the page
912
+ * specified in the given {@link PdfViewing.Pdf.Document.createAnnotation annotation}.
913
+ * @param annotation
914
+ * @returns newly created promise for further asynchronous processing.
915
+ *
916
+ * @throws {@link PdfViewing.UpdateFailedError} The PDF file could not be updated.
917
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
918
+ * @throws {@link PdfViewing.LicenseError} The license is not valid for the editing feature.
919
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.createAnnotation annotation} argument is `null`
920
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.createAnnotation annotation} is not placed on a page
921
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.createAnnotation annotation} is added twice to the document
922
+ */
923
+ createAnnotation(annotation: PdfViewing.Pdf.Annotations.Annotation): Promise<void>;
924
+ private createAnnotationCallback;
925
+ /**
926
+ *
927
+ * Delete an existing {@link PdfViewing.Pdf.Annotations.Annotation } from the document.
928
+ * @param annotation
929
+ * @returns newly created promise for further asynchronous processing.
930
+ *
931
+ * @throws {@link PdfViewing.UpdateFailedError} The PDF file could not be updated
932
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
933
+ * @throws {@link PdfViewing.LicenseError} The license is not valid for the editing feature.
934
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.deleteAnnotation annotation} argument is `null`
935
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.deleteAnnotation annotation} had already been deleted
936
+ */
937
+ deleteAnnotation(annotation: PdfViewing.Pdf.Annotations.Annotation): Promise<void>;
938
+ private deleteAnnotationCallback;
939
+ /**
940
+ *
941
+ * Edit an existing {@link PdfViewing.Pdf.Annotations.Annotation } that is attached to the document.
942
+ * @param annotation
943
+ * @returns newly created promise for further asynchronous processing.
944
+ *
945
+ * @throws {@link PdfViewing.UpdateFailedError} The PDF file could not be updated
946
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
947
+ * @throws {@link PdfViewing.LicenseError} The license is not valid for the editing feature.
948
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.editAnnotation annotation} argument is `null`
949
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.editAnnotation annotation} was moved to illegal page
950
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Document.editAnnotation annotation} has been deleted from page
951
+ */
952
+ editAnnotation(annotation: PdfViewing.Pdf.Annotations.Annotation): Promise<void>;
953
+ private editAnnotationCallback;
954
+ /**
955
+ *
956
+ * Get a list of {@link PdfViewing.Pdf.Annotations.Annotation }s associated with the document
957
+ * and placed on page {@link PdfViewing.Pdf.Document.getAnnotations pageNumber}.
958
+ * This list is only updated after the asynchronous operations that modify annotations
959
+ * ({@link PdfViewing.Pdf.Document.createAnnotation }, {@link PdfViewing.Pdf.Document.deleteAnnotation } and {@link PdfViewing.Pdf.Document.editAnnotation })
960
+ * have finished.
961
+ * @param pageNumber
962
+ * @returns
963
+ *
964
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
965
+ */
966
+ getAnnotations(pageNumber: number): Promise<PdfViewing.Pdf.Annotations.AnnotationList>;
967
+ private getAnnotationsCallback;
968
+ /**
969
+ *
970
+ * Get a list of {@link PdfViewing.Pdf.Content.TextFragment }s that are placed on page {@link PdfViewing.Pdf.Document.getTextFragments pageNumber}.
971
+ * @param pageNumber
972
+ * @returns
973
+ *
974
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
975
+ */
976
+ getTextFragments(pageNumber: number): Promise<PdfViewing.Pdf.Content.TextFragmentList>;
977
+ private getTextFragmentsCallback;
978
+ /**
979
+ *
980
+ * Copy the page of another {@link PdfViewing.Pdf.Document } to this document.
981
+ * This copy is not yet visible anywhere but can be used to create a {@link PdfViewing.Pdf.Annotations.CustomImageStamp } using {@link PdfViewing.Pdf.Annotations.CustomImageStamp.create } , which will add said page as an annotation.
982
+ * @param otherDocument
983
+ * The document where the page is copied from
984
+ * @param pageNumber
985
+ * The number of the page to be copied
986
+ * @returns
987
+ * An identifier which can be used to create annotations on this document using {@link PdfViewing.Pdf.Annotations.CustomImageStamp.create }
988
+ *
989
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
990
+ */
991
+ registerPdfPage(otherDocument: PdfViewing.Pdf.Document, pageNumber: number): Promise<number>;
992
+ private registerPdfPageCallback;
993
+ /**
994
+ *
995
+ * Get a List of {@link PdfViewing.Pdf.Navigation.OutlineItem }s attached to the document.
996
+ * @param parentOutline
997
+ * Insert `null` to get top level outline item of document.
998
+ * @returns
999
+ *
1000
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1001
+ */
1002
+ getOutlines(parentOutline: PdfViewing.Pdf.Navigation.OutlineItem | null): Promise<PdfViewing.Pdf.Navigation.OutlineItemList>;
1003
+ private getOutlinesCallback;
1004
+ /**
1005
+ *
1006
+ * Render page {@link PdfViewing.Pdf.Document.renderPage pageNumber} with a specific rotation into a rectangle of a specific size.
1007
+ * The returned image will always use the exact dimensions passed by parameters {@link PdfViewing.Pdf.Document.renderPage width} and {@link PdfViewing.Pdf.Document.renderPage height} even if the aspect ratio differs from the rendred page.
1008
+ * @param pageNumber
1009
+ * @param width
1010
+ * @param height
1011
+ * @param rotate
1012
+ * Rotate page in degrees.
1013
+ * @param renderOptions
1014
+ * Options used for rendering the page, set `null` to use default options
1015
+ * @returns
1016
+ *
1017
+ * @throws {@link PdfViewing.ArgumentError} if the provided page does not exist
1018
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1019
+ */
1020
+ renderPage(pageNumber: number, width: number, height: number, rotate: PdfViewing.Pdf.Geometry.Rotation, renderOptions?: PdfViewing.Pdf.RenderOptions | null): Promise<PdfViewing.Pdf.Content.Image>;
1021
+ private renderPageCallback;
1022
+ /**
1023
+ *
1024
+ * Get Size of a pdf page.
1025
+ * If the page is not loaded yet the returned value is just a guess based on the already loaded pages
1026
+ * or `null` depending on the value of {@link PdfViewing.Pdf.Document.getPageSize guess}.
1027
+ * @param page
1028
+ * @param guess
1029
+ * Configure to get a best guess if the size has not been loaded yet
1030
+ * @returns
1031
+ */
1032
+ getPageSize(page: number, guess: boolean): PdfViewing.Pdf.Geometry.Real.Size | null;
1033
+ /**
1034
+ *
1035
+ * Get the size in Pdf Coordinates of page {@link PdfViewing.Pdf.Document.getPagePdfSize pageNumber}
1036
+ * @param pageNumber
1037
+ * @returns
1038
+ *
1039
+ * @throws {@link PdfViewing.ArgumentError} if the provided page does not exist
1040
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1041
+ */
1042
+ getPagePdfSize(pageNumber: number): Promise<PdfViewing.Pdf.Geometry.Real.Size>;
1043
+ private getPagePdfSizeCallback;
1044
+ /**
1045
+ *
1046
+ * Get the aspect ratio (width divided by height) of a given {@link PdfViewing.Pdf.Document.getTextStampAspectRatio stampText}.
1047
+ * This value can be used as preparation step to compute the exact bounding box
1048
+ * for creating a {@link PdfViewing.Pdf.Annotations.CustomTextStamp }.
1049
+ * @param stampText
1050
+ * The text that will be used for creating a {@link PdfViewing.Pdf.Annotations.CustomTextStamp }
1051
+ * @returns
1052
+ * The ratio of height divided by width of the given text.
1053
+ *
1054
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1055
+ */
1056
+ getTextStampAspectRatio(stampText: string): Promise<number>;
1057
+ private getTextStampAspectRatioCallback;
1058
+ /**
1059
+ *
1060
+ * Register an image in the document as a resource. This resource can then later be used to add e.g. an {@link PdfViewing.Pdf.Annotations.CustomImageStamp }.
1061
+ * @param image
1062
+ * @returns
1063
+ * ID of the registered image.
1064
+ * This ID is needed by {@link PdfViewing.Pdf.Annotations.CustomImageStamp.create } to link the image resource to the stamp annotation.
1065
+ *
1066
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.Document.registerImage image} is invalid or the format is not supported
1067
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1068
+ */
1069
+ registerImage(image: Uint8Array): Promise<number>;
1070
+ private registerImageCallback;
1071
+ /**
1072
+ *
1073
+ * Register an image in the document as a resource.
1074
+ * This resource can then later be used,
1075
+ * e.g. to add an {@link PdfViewing.Pdf.Annotations.CustomImageStamp }.
1076
+ * @param imageUri
1077
+ * @param authorization
1078
+ * @returns
1079
+ * ID of the registered image.
1080
+ * This ID is needed by {@link PdfViewing.Pdf.Annotations.CustomImageStamp.create } to link the image resource to the stamp annotation.
1081
+ *
1082
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.Document.registerImageUri imageUri} is invalid or the format is not supported
1083
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1084
+ */
1085
+ registerImageUri(imageUri: string, authorization: string | null): Promise<number>;
1086
+ private registerImageUriCallback;
1087
+ /**
1088
+ *
1089
+ * Create a new document by merging this document to the input document.
1090
+ * Pages, optional content, embedded files, and outlines are appended.
1091
+ * Viewing options and metadata from the current document are used.
1092
+ * @param other
1093
+ * Other document.
1094
+ * @param mergeOptions
1095
+ * Document merge options.
1096
+ * @returns
1097
+ * A binary buffer containing the new document.
1098
+ *
1099
+ * @throws {@link PdfViewing.ArgumentError} if the provided document {@link PdfViewing.Pdf.Document.mergeWith other} is invalid
1100
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1101
+ */
1102
+ mergeWith(other: PdfViewing.Pdf.Document, mergeOptions?: PdfViewing.IO.MergeOptions | null): Promise<PdfViewing.Pdf.Content.BinaryBuffer>;
1103
+ private mergeWithCallback;
1104
+ /**
1105
+ * The destination that the creator of the PDF recommends to use when opening a view of the PDF.
1106
+ * This destination can be passed in a {@link PdfViewing.Pdf.ViewOptions } object to {@link PdfViewing.Pdf.View.create } for initializing the view,
1107
+ * thus respecting the creator's recommendation.
1108
+ *
1109
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1110
+ */
1111
+ get initialDestination(): PdfViewing.Pdf.Navigation.Destination | null;
1112
+ /**
1113
+ * Tells whether any modifications have been made that would be lost without saving, such as editing annotations or rotating pages.
1114
+ * Value is 0 after opening and will reset to 0 when saving the document.
1115
+ *
1116
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1117
+ */
1118
+ get hasChanges(): PdfViewing.Pdf.DocumentChange;
1119
+ /**
1120
+ * Return the number of pages in the document.
1121
+ *
1122
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1123
+ */
1124
+ get pageCount(): number;
1125
+ /**
1126
+ * The pagelayoutmode that the creator of the PDF has suggested to use when opening a view of the PDF.
1127
+ * Can be passed in a {@link PdfViewing.Pdf.ViewOptions } object to method {@link PdfViewing.Pdf.View.create } for initializing the view.
1128
+ *
1129
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1130
+ */
1131
+ get initialPageLayoutMode(): PdfViewing.Pdf.Navigation.PageLayoutMode | null;
1132
+ /**
1133
+ *
1134
+ * Return the claimed document compliance.
1135
+ *
1136
+ * Note: Claimed compliance does not guarantee conformance to the standard.
1137
+ *
1138
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1139
+ */
1140
+ get compliance(): PdfViewing.Pdf.Compliance;
1141
+ /**
1142
+ *
1143
+ */
1144
+ get pages(): PdfViewing.Pdf.PageList;
1145
+ }
1146
+ interface ViewingPdfViewEventMap {
1147
+ /**
1148
+ *
1149
+ * This event is triggered if there are any visual updates to the viewport, this can be due to newly rendered content or direct user interaction.
1150
+ * The event passes additional parameters to show what all has changed in this update.
1151
+ * This event can be used to get the newly available information from {@link PdfViewing.Pdf.View.getRenderedResults } and render the viewport.
1152
+ */
1153
+ viewUpdated: ViewUpdatedArgs;
1154
+ /**
1155
+ *
1156
+ * This event is triggered whenever an image has been rendered that will be passed as a result of {@link PdfViewing.Pdf.View.getRenderedResults }.
1157
+ * The same image may be reused for multiple viewupdates, so this event allows to do any expensive preparation work only once.
1158
+ * If any memory was allocated in this step, it can be freed using event {@link PdfViewing.Pdf.ViewingPdfViewEventMap.imageRemovedFromCache }, which returns the identifier of the image being removed.
1159
+ *
1160
+ */
1161
+ imageCreated: PdfViewing.Pdf.Content.Image;
1162
+ /**
1163
+ *
1164
+ * This event is triggered when an image is being removed from the internal cache
1165
+ * due to either being replaced or being too far away from the current viewport.
1166
+ * If any memory was allocated in the {@link PdfViewing.Pdf.ViewingPdfViewEventMap.imageCreated } event, then the associated memory should be released.
1167
+ *
1168
+ * The unique identifier of the image that is being deleted from the internal cache.
1169
+ */
1170
+ imageRemovedFromCache: number;
1171
+ }
1172
+ interface ViewUpdatedArgs {
1173
+ /**
1174
+ *
1175
+ * Either {@link PdfViewing.Pdf.View.firstVisiblePage } or {@link PdfViewing.Pdf.View.lastVisiblePage } or both have changed.
1176
+ */
1177
+ visisblePageRangeChanged: boolean;
1178
+ /**
1179
+ *
1180
+ * {@link PdfViewing.Pdf.View.pageNumber } has changed.
1181
+ */
1182
+ pageNumberChanged: boolean;
1183
+ /**
1184
+ *
1185
+ * {@link PdfViewing.Pdf.View.zoom } has changed.
1186
+ */
1187
+ zoomChanged: boolean;
1188
+ /**
1189
+ *
1190
+ * {@link PdfViewing.Pdf.View.fitMode } has changed.
1191
+ */
1192
+ fitmodeChanged: boolean;
1193
+ /**
1194
+ *
1195
+ * {@link PdfViewing.Pdf.View.pageLayoutMode } has changed.
1196
+ */
1197
+ pageLayoutModeChanged: boolean;
1198
+ /**
1199
+ *
1200
+ * {@link PdfViewing.Pdf.View.viewRotation } has changed.
1201
+ */
1202
+ viewRotationChanged: boolean;
1203
+ /**
1204
+ *
1205
+ * {@link PdfViewing.Pdf.View.scrollMaxPosition } has changed.
1206
+ */
1207
+ scrollMaxPositionChanged: boolean;
1208
+ /**
1209
+ *
1210
+ * A list of pages, that had their size updated.
1211
+ */
1212
+ pageSizeUpdated: number[];
1213
+ /**
1214
+ *
1215
+ * At least one image has changed.
1216
+ */
1217
+ bitmapsUpdated: boolean;
1218
+ }
1219
+ type ViewingPdfViewEventListener = <K extends keyof ViewingPdfViewEventMap>(e: ViewingPdfViewEventMap[K]) => void;
1220
+ type ViewingPdfViewEventTypes = keyof ViewingPdfViewEventMap;
1221
+ /**
1222
+ *
1223
+ * Describes the current view of the viewport on part of the document.
1224
+ * All properties and methods are consistent with what is actually visible, i.e. text fragments on a point can only be detected if said text is currently visible.
1225
+ */
1226
+ class View extends Internal.NativeObject {
1227
+ private eventListeners;
1228
+ /**
1229
+ * @event
1230
+ */
1231
+ addEventListener<K extends keyof ViewingPdfViewEventMap>(type: K, listener: (e: ViewingPdfViewEventMap[K]) => void): void;
1232
+ removeEventListener<K extends keyof ViewingPdfViewEventMap>(type: K, listener: (e: ViewingPdfViewEventMap[K]) => void): void;
1233
+ /**
1234
+ *
1235
+ * @param document
1236
+ * The document this view is displaying.
1237
+ * @param ignoreEmbeddedPreferences
1238
+ * When set ignore any opening preferences or actions that are embedded in the PDF.
1239
+ *
1240
+ * @deprecated Deprecated in Version 3.10. Use static method View.Create instead.
1241
+ */
1242
+ constructor(document: PdfViewing.Pdf.Document, ignoreEmbeddedPreferences: boolean);
1243
+ /**
1244
+ * Close the object
1245
+ *
1246
+ * Release all native resources associated with the object.
1247
+ */
1248
+ close(): void;
1249
+ /**
1250
+ *
1251
+ * @param document
1252
+ * The document this view is displaying.
1253
+ * @param renderOptions
1254
+ * Options used for rendering the page, set `null` to use default options.
1255
+ * @param viewOptions
1256
+ * Options used for the view, set `null` to use default options.
1257
+ * @returns
1258
+ */
1259
+ static create(document: PdfViewing.Pdf.Document, renderOptions: PdfViewing.Pdf.RenderOptions | null, viewOptions: PdfViewing.Pdf.ViewOptions | null): PdfViewing.Pdf.View;
1260
+ /**
1261
+ *
1262
+ * Stops sending `ViewUpdated` events.
1263
+ * Internally user interactions and rendering is still performed normally.
1264
+ * Resume using {@link PdfViewing.Pdf.View.resumeDrawing }.
1265
+ *
1266
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1267
+ */
1268
+ suspendDrawing(): void;
1269
+ /**
1270
+ *
1271
+ * Resume sending `ViewUpdated` events.
1272
+ * Will always trigger a single `ViewUpdated` event, containing all updates since suspending.
1273
+ *
1274
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1275
+ */
1276
+ resumeDrawing(): void;
1277
+ /**
1278
+ *
1279
+ * Navigate the viewport to the given destination.
1280
+ * @param destination
1281
+ *
1282
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1283
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.View.goToDestination destination} is invalid
1284
+ */
1285
+ goToDestination(destination: PdfViewing.Pdf.Navigation.Destination): void;
1286
+ /**
1287
+ *
1288
+ * Navigate the viewport to show the given rectangle by scrolling and zooming as little as possible.
1289
+ * @param rectangle
1290
+ *
1291
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1292
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.View.goToRectangle rectangle} is invalid
1293
+ */
1294
+ goToRectangle(rectangle: PdfViewing.Pdf.Geometry.Real.RectangleOnPage): void;
1295
+ /**
1296
+ *
1297
+ * Returns a list of {@link PdfViewing.Pdf.Content.TextFragment } at point.
1298
+ * @param point
1299
+ * @returns
1300
+ *
1301
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1302
+ * @throws {@link PdfViewing.NotFoundError} The given {@link PdfViewing.Pdf.View.getTextFragmentsOnPoint point} is on no page.
1303
+ * @throws {@link PdfViewing.FatalError} The page is not in cache.
1304
+ */
1305
+ getTextFragmentsOnPoint(point: PdfViewing.Pdf.Geometry.Integer.Point): PdfViewing.Pdf.Content.TextFragmentList;
1306
+ /**
1307
+ *
1308
+ * Returns a list of all {@link PdfViewing.Pdf.Content.TextFragment }s on a given page.
1309
+ * @param pageNumber
1310
+ * @returns
1311
+ *
1312
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1313
+ * @throws {@link PdfViewing.FatalError} The page is not in cache.
1314
+ */
1315
+ getTextFragments(pageNumber: number): PdfViewing.Pdf.Content.TextFragmentList;
1316
+ /**
1317
+ *
1318
+ * Returns a textselection of all text within a rectangle.
1319
+ * Only text that is already loaded (and thus rendered) is selected.
1320
+ * Only the text on the rectangle's `PageNumber` field page is selected, even if extending the rectangle beyond the page boundaries.
1321
+ * The rectangle is defined by two corner points which may be on different pages.
1322
+ * @param startPoint
1323
+ * @param endPoint
1324
+ * @returns
1325
+ *
1326
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1327
+ */
1328
+ getRectangularTextSelection(startPoint: PdfViewing.Pdf.Geometry.Real.PointOnPage, endPoint: PdfViewing.Pdf.Geometry.Real.PointOnPage): PdfViewing.Pdf.Content.TextSelection;
1329
+ /**
1330
+ *
1331
+ * Returns a textselection in between `startPoint` and `endPoint`.
1332
+ * Only text that is already loaded (and thus rendered) is selected.
1333
+ * @param startPoint
1334
+ * @param endPoint
1335
+ * @returns
1336
+ *
1337
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1338
+ */
1339
+ getTextSelection(startPoint: PdfViewing.Pdf.Geometry.Real.PointOnPage, endPoint: PdfViewing.Pdf.Geometry.Real.PointOnPage): PdfViewing.Pdf.Content.TextSelection | null;
1340
+ /**
1341
+ *
1342
+ * Returns a {@link PdfViewing.Pdf.Content.TextSelection? } of the word at the given location.
1343
+ * If multiple word are at this location, the smallest one is returned.
1344
+ * @param point
1345
+ * @returns
1346
+ *
1347
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1348
+ * @throws {@link PdfViewing.NotFoundError} if there are no words at {@link PdfViewing.Pdf.View.getWordOnPoint point}
1349
+ */
1350
+ getWordOnPoint(point: PdfViewing.Pdf.Geometry.Real.PointOnPage): PdfViewing.Pdf.Content.TextSelection | null;
1351
+ /**
1352
+ *
1353
+ * Returns a list of {@link PdfViewing.Pdf.Annotations.Annotation }s at point.
1354
+ * Returns annotations in ascending z-order, thus the most visible annotation is the last element of the returned list.
1355
+ * @param point
1356
+ * @param onlySelectable
1357
+ * @returns
1358
+ *
1359
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1360
+ */
1361
+ getAnnotationsOnPoint(point: PdfViewing.Pdf.Geometry.Integer.Point, onlySelectable: boolean): PdfViewing.Pdf.Annotations.AnnotationList;
1362
+ /**
1363
+ *
1364
+ * Get the rendering information to display the currently visible viewport.
1365
+ * @returns
1366
+ *
1367
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1368
+ */
1369
+ getRenderedResults(): PdfViewing.Pdf.Content.RenderResults;
1370
+ /**
1371
+ *
1372
+ * Transform a point from viewport coordinates (top-left origin in pixels on viewport) to on-page coordinates (bottom-left origin in dots on a page).
1373
+ * If the given point is not on any page, then the closest page will be used as a reference for the returned point.
1374
+ * @param pointOnViewport
1375
+ * @param snapToPage
1376
+ * If the transformed point is not on any page, snap it to the border of the closest page.
1377
+ * @returns
1378
+ *
1379
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1380
+ */
1381
+ transformPointFromViewportToPage(pointOnViewport: PdfViewing.Pdf.Geometry.Integer.Point, snapToPage: boolean): PdfViewing.Pdf.Geometry.Real.PointOnPage;
1382
+ /**
1383
+ *
1384
+ * Transform a point from viewport coordinates (top-left origin in pixels on viewport) to on-page coordinates (bottom-left origin in dots on a page).
1385
+ * If the given point is not on any page, then the closest page will be used as a reference for the returned point.
1386
+ * @param pointOnViewport
1387
+ * @param pageNumber
1388
+ * @param snapToPage
1389
+ * If the transformed point is not on any page, snap it to the border of the closest page.
1390
+ * @returns
1391
+ * Return the point in relation to the specified page.
1392
+ *
1393
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.View.transformPointFromViewportToSpecificPage pageNumber} does not exist
1394
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1395
+ */
1396
+ transformPointFromViewportToSpecificPage(pointOnViewport: PdfViewing.Pdf.Geometry.Integer.Point, pageNumber: number, snapToPage: boolean): PdfViewing.Pdf.Geometry.Real.PointOnPage;
1397
+ /**
1398
+ *
1399
+ * Transform a rectangle from viewport coordinates (top-left origin in pixels on viewport) to on-page coordinates (bottom-left origin in dots on a page) on a specific page.
1400
+ * @param rectangleOnViewport
1401
+ * @param pageNumber
1402
+ * @returns
1403
+ *
1404
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.View.transformRectangleFromViewportToSpecificPage pageNumber} does not exist
1405
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1406
+ */
1407
+ transformRectangleFromViewportToSpecificPage(rectangleOnViewport: PdfViewing.Pdf.Geometry.Integer.Rectangle, pageNumber: number): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
1408
+ /**
1409
+ *
1410
+ * Transform a point from on-page coordinates (bottom-left origin in dots on a page) to viewport coordinates (top-left origin in pixels on viewport).
1411
+ * @param pointOnPage
1412
+ * @returns
1413
+ *
1414
+ * @throws {@link PdfViewing.ArgumentError} if {@link PdfViewing.Pdf.View.transformPointFromPageToViewport pointOnPage} is not on any page
1415
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1416
+ */
1417
+ transformPointFromPageToViewport(pointOnPage: PdfViewing.Pdf.Geometry.Real.PointOnPage): PdfViewing.Pdf.Geometry.Integer.Point;
1418
+ /**
1419
+ *
1420
+ * Transform a rectangle from on-page coordinates (bottom-left origin in dots on a page) to viewport coordinates (top-left origin in pixels on viewport).
1421
+ * @param rectangleOnPage
1422
+ * @returns
1423
+ *
1424
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1425
+ * @throws {@link PdfViewing.ArgumentError} if {@link PdfViewing.Pdf.View.transformRectangleFromPageToViewport rectangleOnPage} is not on any page
1426
+ */
1427
+ transformRectangleFromPageToViewport(rectangleOnPage: PdfViewing.Pdf.Geometry.Real.RectangleOnPage): PdfViewing.Pdf.Geometry.Integer.Rectangle;
1428
+ /**
1429
+ *
1430
+ * Get the rectangle of a page in viewport coordinates (top-left origin in pixels on viewport).
1431
+ * If the document is newly opened this rectangle might be a guess, any updates to the loaded pagerectangles is reported in the `ViewUpdated` event with parameter `pageSizeUpdated`.
1432
+ * @param pageNumber
1433
+ * @returns
1434
+ *
1435
+ * @throws {@link PdfViewing.ArgumentError} if page with {@link PdfViewing.Pdf.View.getPageRectangleOnViewport pageNumber} is not on viewport
1436
+ * @throws {@link PdfViewing.ArgumentError} if the provided {@link PdfViewing.Pdf.View.getPageRectangleOnViewport pageNumber} does not exist
1437
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1438
+ */
1439
+ getPageRectangleOnViewport(pageNumber: number): PdfViewing.Pdf.Geometry.Integer.Rectangle;
1440
+ /**
1441
+ *
1442
+ * Transform a length from on-page coordinates (dots) to viewport coordinates (pixels).
1443
+ * @param pdfLength
1444
+ * @returns
1445
+ *
1446
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1447
+ */
1448
+ transformPdfLengthToViewportLength(pdfLength: number): number;
1449
+ /**
1450
+ *
1451
+ * Transform a length from viewport coordinates (pixels) to on-page coordinates (dots).
1452
+ * @param screenLength
1453
+ * @returns
1454
+ *
1455
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1456
+ */
1457
+ transformViewportLengthToPdfLength(screenLength: number): number;
1458
+ /**
1459
+ *
1460
+ * Set a new zoomfactor, keeping point {@link PdfViewing.Pdf.View.zoomOnLocation location} at a constant location on viewport.
1461
+ * @param zoom
1462
+ * @param location
1463
+ *
1464
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1465
+ */
1466
+ zoomOnLocation(zoom: number, location: PdfViewing.Pdf.Geometry.Integer.Point): void;
1467
+ /**
1468
+ *
1469
+ * The currently most visible page.
1470
+ *
1471
+ * When getting, returns the page which covers most area on the view port.
1472
+ * If multiple pages cover the same amount of space,
1473
+ * the one with smaller page number is returned.
1474
+ *
1475
+ * When setting this property,
1476
+ * the view port moves to make this page the most visible page,
1477
+ * trying to align it to the top of the view port.
1478
+ *
1479
+ * Note: There are some cases in which a page cannot be made most visible.
1480
+ * Therefore setting this property to a certain value does not guarantee that the same value is returned when getting.
1481
+ * (Most notable cases are PageLayoutModes
1482
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoColumnLeft },
1483
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoColumnRight },
1484
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoPageLeft },
1485
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoPageRight },
1486
+ * and whenever viewing the end of a document with low {@link PdfViewing.Pdf.View.zoom }).
1487
+ *
1488
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1489
+ */
1490
+ get pageNumber(): number;
1491
+ /**
1492
+ *
1493
+ * The currently most visible page.
1494
+ *
1495
+ * When getting, returns the page which covers most area on the view port.
1496
+ * If multiple pages cover the same amount of space,
1497
+ * the one with smaller page number is returned.
1498
+ *
1499
+ * When setting this property,
1500
+ * the view port moves to make this page the most visible page,
1501
+ * trying to align it to the top of the view port.
1502
+ *
1503
+ * Note: There are some cases in which a page cannot be made most visible.
1504
+ * Therefore setting this property to a certain value does not guarantee that the same value is returned when getting.
1505
+ * (Most notable cases are PageLayoutModes
1506
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoColumnLeft },
1507
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoColumnRight },
1508
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoPageLeft },
1509
+ * {@link PdfViewing.Pdf.Navigation.PageLayoutMode.TwoPageRight },
1510
+ * and whenever viewing the end of a document with low {@link PdfViewing.Pdf.View.zoom }).
1511
+ *
1512
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1513
+ * @throws {@link PdfViewing.ArgumentError} if the provided page number does not exist
1514
+ */
1515
+ set pageNumber(pageNumber: number);
1516
+ /**
1517
+ * The first currently visible page.
1518
+ *
1519
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1520
+ */
1521
+ get firstVisiblePage(): number;
1522
+ /**
1523
+ * The last currently visible page.
1524
+ *
1525
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1526
+ */
1527
+ get lastVisiblePage(): number;
1528
+ /**
1529
+ * The current zoom factor.
1530
+ * Default is 1.0.
1531
+ * Excessive zoom factors (below 0.1 or above 10.0) are not recommended.
1532
+ * Using {@link PdfViewing.Pdf.View.zoomOnLocation } can be used to get finer control on what the viewport is focused on during zooming.
1533
+ * If setting zoom directly, top-left of the viewport is used as a focus point.
1534
+ *
1535
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1536
+ */
1537
+ get zoom(): number;
1538
+ /**
1539
+ * The current zoom factor.
1540
+ * Default is 1.0.
1541
+ * Excessive zoom factors (below 0.1 or above 10.0) are not recommended.
1542
+ * Using {@link PdfViewing.Pdf.View.zoomOnLocation } can be used to get finer control on what the viewport is focused on during zooming.
1543
+ * If setting zoom directly, top-left of the viewport is used as a focus point.
1544
+ *
1545
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1546
+ */
1547
+ set zoom(zoom: number);
1548
+ /**
1549
+ * The current x/y coordinates at which the viewport is located.
1550
+ * Determines scrollbar location in relation to scrollbar length,
1551
+ * which is given by {@link PdfViewing.Pdf.View.scrollMaxPosition }.
1552
+ *
1553
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1554
+ */
1555
+ get scrollPosition(): PdfViewing.Pdf.Geometry.Integer.ScrollPosition;
1556
+ /**
1557
+ * The current x/y coordinates at which the viewport is located.
1558
+ * Determines scrollbar location in relation to scrollbar length,
1559
+ * which is given by {@link PdfViewing.Pdf.View.scrollMaxPosition }.
1560
+ *
1561
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1562
+ */
1563
+ set scrollPosition(scrollPosition: PdfViewing.Pdf.Geometry.Integer.ScrollPosition);
1564
+ /**
1565
+ * The maximum x/y coordinates that can be scrolled to.
1566
+ * Determines scrollbar ranges.
1567
+ *
1568
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1569
+ */
1570
+ get scrollMaxPosition(): PdfViewing.Pdf.Geometry.Integer.ScrollPosition;
1571
+ /**
1572
+ * Rotate all pages to a specific orientation.
1573
+ * Default is {@link PdfViewing.Pdf.Geometry.Rotation.NoRotation }
1574
+ *
1575
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1576
+ */
1577
+ get viewRotation(): PdfViewing.Pdf.Geometry.Rotation;
1578
+ /**
1579
+ * Rotate all pages to a specific orientation.
1580
+ * Default is {@link PdfViewing.Pdf.Geometry.Rotation.NoRotation }
1581
+ *
1582
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1583
+ */
1584
+ set viewRotation(viewRotation: PdfViewing.Pdf.Geometry.Rotation);
1585
+ /**
1586
+ * The {@link PdfViewing.Pdf.Navigation.FitMode } used to fit the viewport onto the document.
1587
+ *
1588
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1589
+ */
1590
+ get fitMode(): PdfViewing.Pdf.Navigation.FitMode;
1591
+ /**
1592
+ * The {@link PdfViewing.Pdf.Navigation.FitMode } used to fit the viewport onto the document.
1593
+ *
1594
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1595
+ */
1596
+ set fitMode(fitMode: PdfViewing.Pdf.Navigation.FitMode);
1597
+ /**
1598
+ * The {@link PdfViewing.Pdf.Navigation.PageLayoutMode } used to arrange pages on the viewport.
1599
+ *
1600
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1601
+ */
1602
+ get pageLayoutMode(): PdfViewing.Pdf.Navigation.PageLayoutMode;
1603
+ /**
1604
+ * The {@link PdfViewing.Pdf.Navigation.PageLayoutMode } used to arrange pages on the viewport.
1605
+ *
1606
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1607
+ */
1608
+ set pageLayoutMode(pageLayoutMode: PdfViewing.Pdf.Navigation.PageLayoutMode);
1609
+ /**
1610
+ * The size of the border in pixels in between pages when rendered on viewport. Default: 10px.
1611
+ *
1612
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1613
+ */
1614
+ get borderSize(): number;
1615
+ /**
1616
+ * The size of the border in pixels in between pages when rendered on viewport. Default: 10px.
1617
+ *
1618
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1619
+ * @throws {@link PdfViewing.ArgumentError} If the given value was smaller than 0
1620
+ */
1621
+ set borderSize(borderSize: number);
1622
+ /**
1623
+ * The size of the margin in pixels around the canvas. Default: 5px in all directions.
1624
+ *
1625
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1626
+ */
1627
+ get canvasMargin(): PdfViewing.Pdf.Geometry.Integer.Padding;
1628
+ /**
1629
+ * The size of the margin in pixels around the canvas. Default: 5px in all directions.
1630
+ *
1631
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1632
+ * @throws {@link PdfViewing.ArgumentError} If the given value was smaller than 0
1633
+ */
1634
+ set canvasMargin(canvasMargin: PdfViewing.Pdf.Geometry.Integer.Padding);
1635
+ /**
1636
+ * The Dots Per Inch of the used screen. Default `96.0`.
1637
+ *
1638
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1639
+ */
1640
+ get screenDPI(): number;
1641
+ /**
1642
+ * The Dots Per Inch of the used screen. Default `96.0`.
1643
+ *
1644
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1645
+ */
1646
+ set screenDPI(screenDPI: number);
1647
+ /**
1648
+ * The {@link PdfViewing.Pdf.Content.Byteorder } used for rendered images.
1649
+ *
1650
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1651
+ */
1652
+ get byteorder(): PdfViewing.Pdf.Content.Byteorder;
1653
+ /**
1654
+ * The {@link PdfViewing.Pdf.Content.Byteorder } used for rendered images.
1655
+ *
1656
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1657
+ */
1658
+ set byteorder(byteorder: PdfViewing.Pdf.Content.Byteorder);
1659
+ /**
1660
+ * The size of the viewport for this view.
1661
+ * Default: 720 x 480 pixels.
1662
+ *
1663
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1664
+ */
1665
+ get viewportSize(): PdfViewing.Pdf.Geometry.Integer.Size;
1666
+ /**
1667
+ * The size of the viewport for this view.
1668
+ * Default: 720 x 480 pixels.
1669
+ *
1670
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1671
+ */
1672
+ set viewportSize(viewportSize: PdfViewing.Pdf.Geometry.Integer.Size);
1673
+ }
1674
+ namespace Annotations {
1675
+ /**
1676
+ *
1677
+ */
1678
+ class Color extends Internal.NativeBase {
1679
+ /**
1680
+ *
1681
+ * The intensity of red in the described color as a value 0-255.
1682
+ */
1683
+ red: number;
1684
+ /**
1685
+ *
1686
+ * The intensity of green in the described color as a value 0-255.
1687
+ */
1688
+ green: number;
1689
+ /**
1690
+ *
1691
+ * The intensity of blue in the described color as a value 0-255.
1692
+ */
1693
+ blue: number;
1694
+ /**
1695
+ *
1696
+ * The opaqueness in the described color as a value 0-255.
1697
+ */
1698
+ alpha: number;
1699
+ constructor(red: number, green: number, blue: number, alpha: number);
1700
+ equals(obj: Color | null): boolean;
1701
+ }
1702
+ /**
1703
+ *
1704
+ * Specifies the text displayed for predefined {@link PdfViewing.Pdf.Annotations.TextStamp }s.
1705
+ */
1706
+ enum TextStampType {
1707
+ /**
1708
+ *
1709
+ */
1710
+ Approved = 0,
1711
+ /**
1712
+ *
1713
+ */
1714
+ Experimental = 1,
1715
+ /**
1716
+ *
1717
+ */
1718
+ NotApproved = 2,
1719
+ /**
1720
+ *
1721
+ */
1722
+ AsIs = 3,
1723
+ /**
1724
+ *
1725
+ */
1726
+ Expired = 4,
1727
+ /**
1728
+ *
1729
+ */
1730
+ NotForPublicRelease = 5,
1731
+ /**
1732
+ *
1733
+ */
1734
+ Confidential = 6,
1735
+ /**
1736
+ *
1737
+ */
1738
+ Final = 7,
1739
+ /**
1740
+ *
1741
+ */
1742
+ Sold = 8,
1743
+ /**
1744
+ *
1745
+ */
1746
+ Departmental = 9,
1747
+ /**
1748
+ *
1749
+ */
1750
+ ForComment = 10,
1751
+ /**
1752
+ *
1753
+ */
1754
+ TopSecret = 11,
1755
+ /**
1756
+ *
1757
+ */
1758
+ Draft = 12,
1759
+ /**
1760
+ *
1761
+ */
1762
+ ForPublicRelease = 13
1763
+ }
1764
+ /**
1765
+ *
1766
+ * Stamp color used for the appearance generation of {@link PdfViewing.Pdf.Annotations.CustomTextStamp }.
1767
+ */
1768
+ enum StampColor {
1769
+ /**
1770
+ *
1771
+ */
1772
+ Green = 0,
1773
+ /**
1774
+ *
1775
+ */
1776
+ Red = 1,
1777
+ /**
1778
+ *
1779
+ */
1780
+ Blue = 2
1781
+ }
1782
+ /**
1783
+ *
1784
+ * Specifies the type of icon displayed on a page for a {@link PdfViewing.Pdf.Annotations.FileAttachment }.
1785
+ */
1786
+ enum FileAttachmentIcon {
1787
+ /**
1788
+ *
1789
+ */
1790
+ Graph = 0,
1791
+ /**
1792
+ *
1793
+ */
1794
+ PushPin = 1,
1795
+ /**
1796
+ *
1797
+ */
1798
+ Paperclip = 2,
1799
+ /**
1800
+ *
1801
+ */
1802
+ Tag = 3,
1803
+ /**
1804
+ *
1805
+ */
1806
+ CustomIcon = 127
1807
+ }
1808
+ /**
1809
+ *
1810
+ * Specifies the type of styling used for the border of the annotation.
1811
+ */
1812
+ enum BorderStyleType {
1813
+ /**
1814
+ *
1815
+ */
1816
+ Lined = 0,
1817
+ /**
1818
+ *
1819
+ */
1820
+ Beveled = 1,
1821
+ /**
1822
+ *
1823
+ */
1824
+ Inset = 2,
1825
+ /**
1826
+ *
1827
+ */
1828
+ Underline = 3
1829
+ }
1830
+ /**
1831
+ *
1832
+ * Specifies the type of line termination for line and poly-line annotations.
1833
+ */
1834
+ enum LineEnding {
1835
+ /**
1836
+ *
1837
+ */
1838
+ None = 0,
1839
+ /**
1840
+ *
1841
+ */
1842
+ OpenArrow = 1,
1843
+ /**
1844
+ *
1845
+ */
1846
+ ClosedArrow = 2,
1847
+ /**
1848
+ *
1849
+ */
1850
+ rectangle = 3,
1851
+ /**
1852
+ *
1853
+ */
1854
+ Circle = 4,
1855
+ /**
1856
+ *
1857
+ */
1858
+ Diamond = 5,
1859
+ /**
1860
+ *
1861
+ */
1862
+ Butt = 6,
1863
+ /**
1864
+ *
1865
+ */
1866
+ ReversedOpenArrow = 7,
1867
+ /**
1868
+ *
1869
+ */
1870
+ ReversedClosedArrow = 8,
1871
+ /**
1872
+ *
1873
+ */
1874
+ Slash = 9
1875
+ }
1876
+ /**
1877
+ * Annotation filter
1878
+ *
1879
+ * Decides whether an annotation is filtered out or not.
1880
+ * This callback is used for saving a subset of annotations to PDF, FDF or XFDF or to selectively render annotations.
1881
+ * @param annotation
1882
+ * Annotation for which it must be decided whether it will be filtered out.
1883
+ * @returns
1884
+ * Returns `false` in case the annotation is filtered out else `true`.
1885
+ */
1886
+ type AnnotationFilter = (annotation: PdfViewing.Pdf.Annotations.Annotation) => boolean;
1887
+ /**
1888
+ * A page annotation
1889
+ *
1890
+ */
1891
+ class Annotation extends Internal.NativeObject {
1892
+ /**
1893
+ * Close the object
1894
+ *
1895
+ * Release all native resources associated with the object.
1896
+ */
1897
+ close(): void;
1898
+ /**
1899
+ * The location on the page (Getter)
1900
+ *
1901
+ *
1902
+ *
1903
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1904
+ */
1905
+ get boundingBox(): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
1906
+ /**
1907
+ * The location on the page (Setter)
1908
+ *
1909
+ *
1910
+ *
1911
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1912
+ */
1913
+ set boundingBox(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage);
1914
+ /**
1915
+ * The annotation's visibility (Getter)
1916
+ *
1917
+ * If `true` then the annotation is present, but is invisible and not available for user interaction.
1918
+ * Depending on the {@link PdfViewing.Pdf.Annotations.Annotation.noPrint } property it will, however, still be visible when printing.
1919
+ *
1920
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1921
+ */
1922
+ get hidden(): boolean;
1923
+ /**
1924
+ * The annotation's visibility (Setter)
1925
+ *
1926
+ * If `true` then the annotation is present, but is invisible and not available for user interaction.
1927
+ * Depending on the {@link PdfViewing.Pdf.Annotations.Annotation.noPrint } property it will, however, still be visible when printing.
1928
+ *
1929
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1930
+ */
1931
+ set hidden(hidden: boolean);
1932
+ /**
1933
+ * The annotation's visibility when printing (Getter)
1934
+ *
1935
+ * If `true` then the annotation is not present in a print output of the document.
1936
+ *
1937
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1938
+ */
1939
+ get noPrint(): boolean;
1940
+ /**
1941
+ * The annotation's visibility when printing (Setter)
1942
+ *
1943
+ * If `true` then the annotation is not present in a print output of the document.
1944
+ *
1945
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1946
+ */
1947
+ set noPrint(noPrint: boolean);
1948
+ /**
1949
+ * The annotation's scaling behavior (Getter)
1950
+ *
1951
+ * If `true` then the annotation's visual appearance does not scale with the zoom factor of a PDF viewer.
1952
+ *
1953
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1954
+ */
1955
+ get noZoom(): boolean;
1956
+ /**
1957
+ * The annotation's rotation behavior (Getter)
1958
+ *
1959
+ * If `true` then the annotation's visual appearance does not rotate with the rotation set in a PDF viewer.
1960
+ *
1961
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1962
+ */
1963
+ get noRotate(): boolean;
1964
+ /**
1965
+ * The annotation's rotation behavior (Setter)
1966
+ *
1967
+ * If `true` then the annotation's visual appearance does not rotate with the rotation set in a PDF viewer.
1968
+ *
1969
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1970
+ */
1971
+ set noRotate(noRotate: boolean);
1972
+ /**
1973
+ * The name by which the annotation is referred to.
1974
+ *
1975
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1976
+ */
1977
+ get name(): string;
1978
+ /**
1979
+ * Private, do not use.
1980
+ */
1981
+ get privateData(): string;
1982
+ /**
1983
+ * Private, do not use.
1984
+ */
1985
+ set privateData(privateData: string);
1986
+ /**
1987
+ * Tag that identifies the source the annotation is coming from.
1988
+ * If the source is an input PDF or an input FDF, the tag comes from {@link PdfViewing.IO.InputDocument.sourceTag }.
1989
+ * Newly created annotations always return `null`.
1990
+ *
1991
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
1992
+ */
1993
+ get sourceTag(): string | null;
1994
+ }
1995
+ /**
1996
+ * Information for a markup annotation
1997
+ *
1998
+ * Holds information contained in a markup annotation or in a reply to a markup annotation.
1999
+ */
2000
+ class MarkupInfo extends Internal.NativeObject {
2001
+ /**
2002
+ * Close the object
2003
+ *
2004
+ * Release all native resources associated with the object.
2005
+ */
2006
+ close(): void;
2007
+ /**
2008
+ * The date of creation (Getter)
2009
+ *
2010
+ *
2011
+ *
2012
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2013
+ */
2014
+ get creationDate(): Date | null;
2015
+ /**
2016
+ * The date of last modification (Getter)
2017
+ *
2018
+ *
2019
+ *
2020
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2021
+ */
2022
+ get modificationDate(): Date | null;
2023
+ /**
2024
+ * Whether the content can be modified (Getter)
2025
+ *
2026
+ * This does not restrict the modification of other aspects of the annotation or its deletion.
2027
+ *
2028
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2029
+ */
2030
+ get locked(): boolean;
2031
+ /**
2032
+ * Whether the content can be modified (Setter)
2033
+ *
2034
+ * This does not restrict the modification of other aspects of the annotation or its deletion.
2035
+ *
2036
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2037
+ */
2038
+ set locked(locked: boolean);
2039
+ /**
2040
+ * The author (Getter)
2041
+ *
2042
+ *
2043
+ *
2044
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2045
+ */
2046
+ get author(): string;
2047
+ /**
2048
+ * The author (Setter)
2049
+ *
2050
+ *
2051
+ *
2052
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2053
+ */
2054
+ set author(author: string);
2055
+ /**
2056
+ * The subject (Getter)
2057
+ *
2058
+ *
2059
+ *
2060
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2061
+ */
2062
+ get subject(): string;
2063
+ /**
2064
+ * The subject (Setter)
2065
+ *
2066
+ *
2067
+ *
2068
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2069
+ */
2070
+ set subject(subject: string);
2071
+ /**
2072
+ * The information content (Getter)
2073
+ *
2074
+ *
2075
+ *
2076
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2077
+ */
2078
+ get content(): string;
2079
+ /**
2080
+ * The information content (Setter)
2081
+ *
2082
+ *
2083
+ *
2084
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2085
+ */
2086
+ set content(content: string);
2087
+ }
2088
+ /**
2089
+ *
2090
+ */
2091
+ class MarkupInfoList extends Internal.NativeObject implements List<PdfViewing.Pdf.Annotations.MarkupInfo> {
2092
+ /**
2093
+ * Close the object
2094
+ *
2095
+ * Release all native resources associated with the object.
2096
+ */
2097
+ close(): void;
2098
+ remove(element: PdfViewing.Pdf.Annotations.MarkupInfo): boolean;
2099
+ add(element: PdfViewing.Pdf.Annotations.MarkupInfo): boolean;
2100
+ addRange(inputList: MarkupInfoList): boolean;
2101
+ set(index: number, element: PdfViewing.Pdf.Annotations.MarkupInfo): void;
2102
+ clear(): void;
2103
+ get(index: number): PdfViewing.Pdf.Annotations.MarkupInfo;
2104
+ getRange(index: number, count: number): MarkupInfoList;
2105
+ get size(): number;
2106
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Annotations.MarkupInfo>;
2107
+ }
2108
+ /**
2109
+ * A pop-up for a markup annotation
2110
+ *
2111
+ */
2112
+ class Popup extends Internal.NativeObject {
2113
+ /**
2114
+ * Close the object
2115
+ *
2116
+ * Release all native resources associated with the object.
2117
+ */
2118
+ close(): void;
2119
+ /**
2120
+ * The pop-up's visibility state (Getter)
2121
+ *
2122
+ *
2123
+ *
2124
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2125
+ */
2126
+ get isOpen(): boolean;
2127
+ /**
2128
+ * The pop-up's visibility state (Setter)
2129
+ *
2130
+ *
2131
+ *
2132
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2133
+ */
2134
+ set isOpen(isOpen: boolean);
2135
+ /**
2136
+ * The pop-up location (Getter)
2137
+ *
2138
+ *
2139
+ *
2140
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2141
+ */
2142
+ get boundingBox(): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
2143
+ /**
2144
+ * The pop-up location (Setter)
2145
+ *
2146
+ *
2147
+ *
2148
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2149
+ */
2150
+ set boundingBox(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage);
2151
+ }
2152
+ /**
2153
+ * A markup annotation
2154
+ *
2155
+ */
2156
+ class MarkupAnnotation extends PdfViewing.Pdf.Annotations.Annotation {
2157
+ /**
2158
+ * Whether the markup annotation can be modified (Getter)
2159
+ *
2160
+ * This does not restrict modification of the markup annotation's content.
2161
+ *
2162
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2163
+ */
2164
+ get locked(): boolean;
2165
+ /**
2166
+ * The information content of this markup (Getter)
2167
+ *
2168
+ *
2169
+ *
2170
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2171
+ */
2172
+ get info(): PdfViewing.Pdf.Annotations.MarkupInfo;
2173
+ /**
2174
+ * The replies to this markup (Getter)
2175
+ *
2176
+ *
2177
+ *
2178
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2179
+ */
2180
+ get replies(): PdfViewing.Pdf.Annotations.MarkupInfoList;
2181
+ }
2182
+ /**
2183
+ * A sticky note annotation
2184
+ *
2185
+ */
2186
+ class StickyNote extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
2187
+ /**
2188
+ * Create a sticky note annotation.
2189
+ *
2190
+ * The returned sticky note annotation is not yet part of any page.
2191
+ * It can be added to a page's list of annotations.
2192
+ * @param topLeft
2193
+ * The location of the annotation's upper left corner on the page.
2194
+ * @param content
2195
+ * The text content
2196
+ * @param color
2197
+ * The paint for the sticky note icon and popup.
2198
+ * If `null` then a default paint is used.
2199
+ * @returns
2200
+ * The newly created sticky note annotation
2201
+ */
2202
+ static create(topLeft: PdfViewing.Pdf.Geometry.Real.PointOnPage, content: string, color: PdfViewing.Pdf.Annotations.Color): PdfViewing.Pdf.Annotations.StickyNote;
2203
+ /**
2204
+ * The paint for the sticky note icon and the popup (Getter)
2205
+ *
2206
+ *
2207
+ *
2208
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2209
+ */
2210
+ get color(): PdfViewing.Pdf.Annotations.Color;
2211
+ /**
2212
+ * The paint for the sticky note icon and the popup (Setter)
2213
+ *
2214
+ *
2215
+ *
2216
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2217
+ */
2218
+ set color(color: PdfViewing.Pdf.Annotations.Color);
2219
+ /**
2220
+ * The pop-up (Getter)
2221
+ *
2222
+ *
2223
+ *
2224
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2225
+ */
2226
+ get popup(): PdfViewing.Pdf.Annotations.Popup | null;
2227
+ }
2228
+ /**
2229
+ * A file attachment annotation
2230
+ *
2231
+ */
2232
+ class FileAttachment extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
2233
+ /**
2234
+ * The displayed icon (Getter)
2235
+ *
2236
+ *
2237
+ *
2238
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2239
+ */
2240
+ get icon(): PdfViewing.Pdf.Annotations.FileAttachmentIcon;
2241
+ /**
2242
+ * The paint for the icon and the popup (Getter)
2243
+ *
2244
+ *
2245
+ *
2246
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2247
+ */
2248
+ get color(): PdfViewing.Pdf.Annotations.Color;
2249
+ /**
2250
+ * The paint for the icon and the popup (Setter)
2251
+ *
2252
+ *
2253
+ *
2254
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2255
+ */
2256
+ set color(color: PdfViewing.Pdf.Annotations.Color);
2257
+ /**
2258
+ * The pop-up (Getter)
2259
+ *
2260
+ *
2261
+ *
2262
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2263
+ */
2264
+ get popup(): PdfViewing.Pdf.Annotations.Popup | null;
2265
+ }
2266
+ /**
2267
+ * A stamp annotation
2268
+ *
2269
+ */
2270
+ class Stamp extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
2271
+ /**
2272
+ * The pop-up (Getter)
2273
+ *
2274
+ *
2275
+ *
2276
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2277
+ */
2278
+ get popup(): PdfViewing.Pdf.Annotations.Popup | null;
2279
+ /**
2280
+ * The paint for the popup (Getter)
2281
+ *
2282
+ *
2283
+ *
2284
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2285
+ */
2286
+ get color(): PdfViewing.Pdf.Annotations.Color;
2287
+ /**
2288
+ * The paint for the popup (Setter)
2289
+ *
2290
+ *
2291
+ *
2292
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2293
+ */
2294
+ set color(color: PdfViewing.Pdf.Annotations.Color);
2295
+ /**
2296
+ * Rotation in relation to the page.
2297
+ *
2298
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2299
+ */
2300
+ get rotation(): PdfViewing.Pdf.Geometry.Rotation;
2301
+ /**
2302
+ * Rotation in relation to the page.
2303
+ *
2304
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2305
+ */
2306
+ set rotation(rotation: PdfViewing.Pdf.Geometry.Rotation);
2307
+ }
2308
+ /**
2309
+ * A text stamp annotation
2310
+ *
2311
+ */
2312
+ class TextStamp extends PdfViewing.Pdf.Annotations.Stamp {
2313
+ /**
2314
+ * Create a text stamp annotation.
2315
+ *
2316
+ * The width of the annotation is computed from the given stamp text.
2317
+ * The returned text stamp annotation is not yet part of any page.
2318
+ * It can be added to a page's list of annotations.
2319
+ * @param topLeft
2320
+ * The location of the annotation's upper left corner on the page.
2321
+ * @param height
2322
+ * The height of the annotation.
2323
+ * @param textType
2324
+ * The text stamp type.
2325
+ * @param text
2326
+ * The text to be shown in this stamp.
2327
+ * @param rotation
2328
+ * The rotation of the annotation in relation to the unrotated view.
2329
+ * The annotation is created with a compensating (and hence opposite) {@link PdfViewing.Pdf.Annotations.Stamp.rotation },
2330
+ * such that it is upright and readable when viewing the document with said view rotation.
2331
+ * @returns
2332
+ * The newly created text stamp annotation.
2333
+ */
2334
+ static createRaw(topLeft: PdfViewing.Pdf.Geometry.Real.PointOnPage, height: number | null, textType: PdfViewing.Pdf.Annotations.TextStampType, text: string, rotation: PdfViewing.Pdf.Geometry.Rotation): PdfViewing.Pdf.Annotations.TextStamp;
2335
+ /**
2336
+ * The displayed text (Getter)
2337
+ *
2338
+ * This defines a predefined text for this text stamp.
2339
+ *
2340
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2341
+ * @throws {@link PdfViewing.UnsupportedFeatureError} The text stamp's type is not supported.
2342
+ */
2343
+ get textType(): PdfViewing.Pdf.Annotations.TextStampType;
2344
+ }
2345
+ /**
2346
+ * A stamp annotation with user defined stamp text
2347
+ *
2348
+ */
2349
+ class CustomTextStamp extends PdfViewing.Pdf.Annotations.Stamp {
2350
+ /**
2351
+ * Create a custom stamp annotation.
2352
+ *
2353
+ * The returned custom Textstamp annotation is not yet part of any page.
2354
+ * It can be added to a page's list of annotations.
2355
+ * The custom stamp annotation's appearance is generated after it was added to a page.
2356
+ * @param boundingBox
2357
+ * The location of the annotation on the page.
2358
+ * Use {@link PdfViewing.Pdf.Document.getTextStampAspectRatio } to obtain the correct aspect ratio of width divided by height of the {@link PdfViewing.Pdf.Annotations.CustomTextStamp.create boundingBox}
2359
+ * @param stampText
2360
+ * The custom stamp text
2361
+ * @param stampColor
2362
+ * The color of the stamp appearance
2363
+ * @param rotation
2364
+ * The rotation of the annotation in relation to the unrotated view.
2365
+ * The annotation is created with a compensating (and hence opposite) {@link PdfViewing.Pdf.Annotations.Stamp.rotation },
2366
+ * such that it is upright and readable when viewing the document with said view rotation.
2367
+ * @returns
2368
+ * The newly created custom text stamp annotation.
2369
+ */
2370
+ static create(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage, stampText: string, stampColor: PdfViewing.Pdf.Annotations.StampColor, rotation: PdfViewing.Pdf.Geometry.Rotation): PdfViewing.Pdf.Annotations.CustomTextStamp;
2371
+ }
2372
+ /**
2373
+ * A stamp annotatation based on an image
2374
+ *
2375
+ */
2376
+ class CustomImageStamp extends PdfViewing.Pdf.Annotations.Stamp {
2377
+ /**
2378
+ * Create a custom stamp annotation.
2379
+ *
2380
+ * The returned custom Imagestamp annotation is not yet part of any page.
2381
+ * It can be added to a page's list of annotations.
2382
+ * The custom stamp annotation's appearance is generated after it was added to a page.
2383
+ * @param boundingBox
2384
+ * The location of the annotation on the page.
2385
+ * For registered images the correct aspect ratio can be derived from the given image.
2386
+ * When creating the stamp from a PDF Page, the aspect ratio can be derived from the size of the page that was copied using {@link PdfViewing.Pdf.Document.getPagePdfSize }
2387
+ * @param imageId
2388
+ * The ID of an image that is already registered in the Document.
2389
+ * Image ID's can be generated from images using {@link PdfViewing.Pdf.Document.registerImage } or from a PDF Page using {@link PdfViewing.Pdf.Document.registerPdfPage }
2390
+ * @param rotation
2391
+ * The rotation of the annotation in relation to the unrotated view.
2392
+ * The annotation is created with a compensating (and hence opposite) {@link PdfViewing.Pdf.Annotations.Stamp.rotation },
2393
+ * such that it is upright and readable when viewing the document with said view rotation.
2394
+ * @returns
2395
+ * The newly created custom text stamp annotation.
2396
+ *
2397
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.CustomImageStamp.create imageId} argument is invalid
2398
+ */
2399
+ static create(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage, imageId: number, rotation: PdfViewing.Pdf.Geometry.Rotation): PdfViewing.Pdf.Annotations.CustomImageStamp;
2400
+ }
2401
+ /**
2402
+ * An annotation that displays text
2403
+ *
2404
+ * For a free-text annotation, the annotation's content is used as text to be displayed as the annotation's visual manifestation on the page.
2405
+ */
2406
+ class FreeText extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
2407
+ /**
2408
+ * Create a free-text annotation.
2409
+ *
2410
+ * The returned free-text annotation is not yet part of any page.
2411
+ * It can be added to a page's list of annotations.
2412
+ * @param boundingBox
2413
+ * The location on the page.
2414
+ * @param richText
2415
+ * The Richtextstring describing content, color and font.
2416
+ * @param backgroundColor
2417
+ * The background color of the freetext annotation. Passing null results in a transparent background.
2418
+ * @param annotationStroke
2419
+ * The stroking style for all lines
2420
+ * @param viewRotation
2421
+ * The rotation of the view, see {@link PdfViewing.Pdf.View.viewRotation }.
2422
+ * The annotation is created with a compensating (and hence opposite) {@link PdfViewing.Pdf.Annotations.FreeText.rotation },
2423
+ * such that it is upright and readable when viewing the document with said view rotation.
2424
+ * @returns
2425
+ * The newly created free text annotation.
2426
+ */
2427
+ static create(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage, richText: string, backgroundColor: PdfViewing.Pdf.Annotations.Color | null, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke, viewRotation: PdfViewing.Pdf.Geometry.Rotation): PdfViewing.Pdf.Annotations.FreeText;
2428
+ /**
2429
+ * The stroking style for all lines. (Getter)
2430
+ *
2431
+ *
2432
+ *
2433
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2434
+ */
2435
+ get annotationStroke(): PdfViewing.Pdf.Annotations.AnnotationStroke;
2436
+ /**
2437
+ * The stroking style for all lines. (Setter)
2438
+ *
2439
+ *
2440
+ *
2441
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2442
+ */
2443
+ set annotationStroke(annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke);
2444
+ /**
2445
+ * The information content (Getter)
2446
+ *
2447
+ *
2448
+ *
2449
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2450
+ */
2451
+ get richText(): string;
2452
+ /**
2453
+ * The information content (Setter)
2454
+ *
2455
+ *
2456
+ *
2457
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2458
+ */
2459
+ set richText(richText: string);
2460
+ /**
2461
+ * The background color (Getter)
2462
+ *
2463
+ *
2464
+ *
2465
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2466
+ */
2467
+ get backgroundColor(): PdfViewing.Pdf.Annotations.Color | null;
2468
+ /**
2469
+ * The background color (Setter)
2470
+ *
2471
+ *
2472
+ *
2473
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2474
+ */
2475
+ set backgroundColor(backgroundColor: PdfViewing.Pdf.Annotations.Color | null);
2476
+ /**
2477
+ * Rotation in relation to the page.
2478
+ * When creating the annotation with a non-zero view rotation in {@link PdfViewing.Pdf.Annotations.FreeText.create },
2479
+ * then this property will initially be the opposite of the given view rotation.
2480
+ *
2481
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2482
+ */
2483
+ get rotation(): PdfViewing.Pdf.Geometry.Rotation;
2484
+ /**
2485
+ * Rotation in relation to the page.
2486
+ * When creating the annotation with a non-zero view rotation in {@link PdfViewing.Pdf.Annotations.FreeText.create },
2487
+ * then this property will initially be the opposite of the given view rotation.
2488
+ *
2489
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2490
+ */
2491
+ set rotation(rotation: PdfViewing.Pdf.Geometry.Rotation);
2492
+ }
2493
+ /**
2494
+ * A drawing annotation
2495
+ *
2496
+ * An annotation used to draws something on a page.
2497
+ */
2498
+ class DrawingAnnotation extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
2499
+ /**
2500
+ * The color used for any stroking and the popup.
2501
+ * The value `null` renders the color completely transparent.
2502
+ *
2503
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2504
+ */
2505
+ get strokeColor(): PdfViewing.Pdf.Annotations.Color | null;
2506
+ /**
2507
+ * The color used for any stroking and the popup.
2508
+ * The value `null` renders the color completely transparent.
2509
+ *
2510
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2511
+ */
2512
+ set strokeColor(strokeColor: PdfViewing.Pdf.Annotations.Color | null);
2513
+ /**
2514
+ * The stroking style for all lines. (Getter)
2515
+ *
2516
+ *
2517
+ *
2518
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2519
+ */
2520
+ get annotationStroke(): PdfViewing.Pdf.Annotations.AnnotationStroke | null;
2521
+ /**
2522
+ * The stroking style for all lines. (Setter)
2523
+ *
2524
+ *
2525
+ *
2526
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2527
+ */
2528
+ set annotationStroke(annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke | null);
2529
+ /**
2530
+ * The pop-up (Getter)
2531
+ *
2532
+ *
2533
+ *
2534
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2535
+ */
2536
+ get popup(): PdfViewing.Pdf.Annotations.Popup | null;
2537
+ /**
2538
+ * The drawing path (Getter)
2539
+ *
2540
+ *
2541
+ *
2542
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2543
+ */
2544
+ get path(): PdfViewing.Pdf.Geometry.Real.Path;
2545
+ }
2546
+ /**
2547
+ * A line annotation
2548
+ *
2549
+ * An annotation that draws a line on a page.
2550
+ */
2551
+ class LineAnnotation extends PdfViewing.Pdf.Annotations.DrawingAnnotation {
2552
+ /**
2553
+ * Create a line annotation.
2554
+ *
2555
+ * The returned line annotation is not yet part of any page.
2556
+ * It can be added to a page's list of annotations.
2557
+ * @param start
2558
+ * The line's start point.
2559
+ * @param end
2560
+ * The line's end point.
2561
+ * @param strokeColor
2562
+ * The color used for stroking and the popup. Pass `null` to set default grey color.
2563
+ * @param annotationStroke
2564
+ * The stroking style for all lines
2565
+ * @returns
2566
+ * The newly created line annotation.
2567
+ *
2568
+ * @throws {@link PdfViewing.ArgumentError} if points {@link PdfViewing.Pdf.Annotations.LineAnnotation.create start} and {@link PdfViewing.Pdf.Annotations.LineAnnotation.create end} are not on the same page
2569
+ */
2570
+ static create(start: PdfViewing.Pdf.Geometry.Real.PointOnPage, end: PdfViewing.Pdf.Geometry.Real.PointOnPage, strokeColor: PdfViewing.Pdf.Annotations.Color | null, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke): PdfViewing.Pdf.Annotations.LineAnnotation;
2571
+ /**
2572
+ * The line's starting point (Getter)
2573
+ *
2574
+ *
2575
+ *
2576
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2577
+ */
2578
+ get start(): PdfViewing.Pdf.Geometry.Real.PointOnPage;
2579
+ /**
2580
+ * The line's ending point (Getter)
2581
+ *
2582
+ *
2583
+ *
2584
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2585
+ */
2586
+ get end(): PdfViewing.Pdf.Geometry.Real.PointOnPage;
2587
+ /**
2588
+ * The starting point's style (Getter)
2589
+ *
2590
+ *
2591
+ *
2592
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2593
+ */
2594
+ get startStyle(): PdfViewing.Pdf.Annotations.LineEnding;
2595
+ /**
2596
+ * The ending point's style (Getter)
2597
+ *
2598
+ *
2599
+ *
2600
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2601
+ */
2602
+ get endStyle(): PdfViewing.Pdf.Annotations.LineEnding;
2603
+ /**
2604
+ * The line ending filling paint (Getter)
2605
+ *
2606
+ * This paint applies to both the starting end the ending point.
2607
+ *
2608
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2609
+ */
2610
+ get lineEndingFill(): PdfViewing.Pdf.Annotations.Color;
2611
+ }
2612
+ /**
2613
+ * A free-hand drawing annotation
2614
+ *
2615
+ */
2616
+ class InkAnnotation extends PdfViewing.Pdf.Annotations.DrawingAnnotation {
2617
+ /**
2618
+ * Create a ink annotation.
2619
+ *
2620
+ * The returned ink annotation is not yet part of any page.
2621
+ * It can be added to a page's list of annotations.
2622
+ * @param pageNumber
2623
+ * @param path
2624
+ * The path of the free-hand drawing.
2625
+ * @param strokeColor
2626
+ * The color used for stroking and the popup
2627
+ * @param annotationStroke
2628
+ * The stroking style for all lines
2629
+ * @returns
2630
+ * The newly created ink annotation.
2631
+ *
2632
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.InkAnnotation.create path} argument is `null`
2633
+ * @throws {@link PdfViewing.NotSupportedError} if the {@link PdfViewing.Pdf.Annotations.InkAnnotation.create path} is not valid for this operation
2634
+ */
2635
+ static create(pageNumber: number, path: PdfViewing.Pdf.Geometry.Real.Path, strokeColor: PdfViewing.Pdf.Annotations.Color, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke): PdfViewing.Pdf.Annotations.InkAnnotation;
2636
+ /**
2637
+ * Set the path
2638
+ *
2639
+ * Supported {@link PdfViewing.Pdf.Geometry.Real.PathOperation }s are
2640
+ * {@link PdfViewing.Pdf.Geometry.Real.PathOperation.MoveTo } and {@link PdfViewing.Pdf.Geometry.Real.PathOperation.LineTo }.
2641
+ * @param path
2642
+ * The new path to be set for the annotation.
2643
+ *
2644
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.InkAnnotation.setPath path} argument is `null`
2645
+ * @throws {@link PdfViewing.NotSupportedError} if the {@link PdfViewing.Pdf.Annotations.InkAnnotation.setPath path} contains unsupported {@link PdfViewing.Pdf.Geometry.Real.PathOperation }s
2646
+ */
2647
+ setPath(path: PdfViewing.Pdf.Geometry.Real.Path): void;
2648
+ }
2649
+ /**
2650
+ * A drawing annotation that consists of several line segments
2651
+ *
2652
+ */
2653
+ class PolyLineAnnotation extends PdfViewing.Pdf.Annotations.DrawingAnnotation {
2654
+ /**
2655
+ * Create a poly-line annotation.
2656
+ *
2657
+ * The returned poly-line annotation is not yet part of any page.
2658
+ * It can be added to a page's list of annotations.
2659
+ * @param pageNumber
2660
+ * @param path
2661
+ * The path of the poly line.
2662
+ * @param strokeColor
2663
+ * The color used for stroking and the popup
2664
+ * @param annotationStroke
2665
+ * The stroking style for all lines
2666
+ * @returns
2667
+ * The newly created poly-line annotation.
2668
+ *
2669
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.PolyLineAnnotation.create path} argument is `null`
2670
+ * @throws {@link PdfViewing.NotSupportedError} if the {@link PdfViewing.Pdf.Annotations.PolyLineAnnotation.create path} is not valid for this operation
2671
+ */
2672
+ static create(pageNumber: number, path: PdfViewing.Pdf.Geometry.Real.Path, strokeColor: PdfViewing.Pdf.Annotations.Color, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke): PdfViewing.Pdf.Annotations.PolyLineAnnotation;
2673
+ /**
2674
+ * The starting point's style (Getter)
2675
+ *
2676
+ *
2677
+ *
2678
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2679
+ */
2680
+ get startStyle(): PdfViewing.Pdf.Annotations.LineEnding;
2681
+ /**
2682
+ * The ending point's style (Getter)
2683
+ *
2684
+ *
2685
+ *
2686
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2687
+ */
2688
+ get endStyle(): PdfViewing.Pdf.Annotations.LineEnding;
2689
+ /**
2690
+ * The line ending filling paint for both start and end (Getter)
2691
+ *
2692
+ *
2693
+ *
2694
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2695
+ */
2696
+ get lineEndingFill(): PdfViewing.Pdf.Annotations.Color;
2697
+ }
2698
+ /**
2699
+ * A polygon annotation
2700
+ *
2701
+ */
2702
+ class PolygonAnnotation extends PdfViewing.Pdf.Annotations.DrawingAnnotation {
2703
+ /**
2704
+ * Create a polygon annotation.
2705
+ *
2706
+ * The returned polygon annotation is not yet part of any page.
2707
+ * It can be added to a page's list of annotations.
2708
+ * @param pageNumber
2709
+ * @param path
2710
+ * The path of the polygon.
2711
+ * @param strokeColor
2712
+ * The color used for stroking and the popup.
2713
+ * The alpha value of this color is used for stroking and filling.
2714
+ * Set `null` or a color with alpha = 0 to make stroke transparent.
2715
+ * @param annotationStroke
2716
+ * The stroking style for all lines
2717
+ * @param borderStyleType
2718
+ * The style of the stroked lines
2719
+ * @param fillColor
2720
+ * The paint used for filling the polygon.
2721
+ * If `null` then the polygon is not filled.
2722
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.PolygonAnnotation.create strokeColor} is `null` or its alpha value is 0.
2723
+ * @returns
2724
+ * The newly created polygon annotation.
2725
+ *
2726
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.PolygonAnnotation.create path} argument is `null`
2727
+ * @throws {@link PdfViewing.NotSupportedError} if the {@link PdfViewing.Pdf.Annotations.PolygonAnnotation.create path} is not valid for this operation
2728
+ */
2729
+ static create(pageNumber: number, path: PdfViewing.Pdf.Geometry.Real.Path, strokeColor: PdfViewing.Pdf.Annotations.Color | null, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke, borderStyleType: PdfViewing.Pdf.Annotations.BorderStyleType, fillColor: PdfViewing.Pdf.Annotations.Color | null): PdfViewing.Pdf.Annotations.PolygonAnnotation;
2730
+ /**
2731
+ *
2732
+ *
2733
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2734
+ */
2735
+ get borderStyleType(): PdfViewing.Pdf.Annotations.BorderStyleType;
2736
+ /**
2737
+ *
2738
+ *
2739
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2740
+ */
2741
+ set borderStyleType(borderStyleType: PdfViewing.Pdf.Annotations.BorderStyleType);
2742
+ /**
2743
+ * The filling paint (Getter)
2744
+ *
2745
+ * If `null` then the polygon is not filled.
2746
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is `null` or its alpha value is 0.
2747
+ * Otherwise alpha of {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is used.
2748
+ *
2749
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2750
+ */
2751
+ get fillColor(): PdfViewing.Pdf.Annotations.Color | null;
2752
+ /**
2753
+ * The filling paint (Setter)
2754
+ *
2755
+ * If `null` then the polygon is not filled.
2756
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is `null` or its alpha value is 0.
2757
+ * Otherwise alpha of {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is used.
2758
+ *
2759
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2760
+ */
2761
+ set fillColor(fillColor: PdfViewing.Pdf.Annotations.Color | null);
2762
+ }
2763
+ /**
2764
+ * A rectangle drawing annotation
2765
+ *
2766
+ */
2767
+ class RectangleAnnotation extends PdfViewing.Pdf.Annotations.DrawingAnnotation {
2768
+ /**
2769
+ * Create a rectangle annotation.
2770
+ *
2771
+ * The returned rectangle annotation is not yet part of any page.
2772
+ * It can be added to a page's list of annotations.
2773
+ * @param boundingBox
2774
+ * The location on the page.
2775
+ * @param strokeColor
2776
+ * The color used for stroking and the popup.
2777
+ * The alpha value of this color is used for stroking and filling.
2778
+ * Set `null` or a color with alpha = 0 to make stroke transparent.
2779
+ * @param annotationStroke
2780
+ * The stroking style for all lines.
2781
+ * @param borderStyleType
2782
+ * The style of the stroked lines
2783
+ * @param fillColor
2784
+ * The paint used for filling the rectangle.
2785
+ * If `null` then the rectangle is not filled.
2786
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.RectangleAnnotation.create strokeColor} is `null` or its alpha value is 0.
2787
+ * @returns
2788
+ * The newly created rectangle annotation.
2789
+ */
2790
+ static create(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage, strokeColor: PdfViewing.Pdf.Annotations.Color | null, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke, borderStyleType: PdfViewing.Pdf.Annotations.BorderStyleType, fillColor: PdfViewing.Pdf.Annotations.Color | null): PdfViewing.Pdf.Annotations.RectangleAnnotation;
2791
+ /**
2792
+ *
2793
+ *
2794
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2795
+ */
2796
+ get borderStyleType(): PdfViewing.Pdf.Annotations.BorderStyleType;
2797
+ /**
2798
+ *
2799
+ *
2800
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2801
+ */
2802
+ set borderStyleType(borderStyleType: PdfViewing.Pdf.Annotations.BorderStyleType);
2803
+ /**
2804
+ * The filling paint (Getter)
2805
+ *
2806
+ * If `null` then the rectangle is not filled.
2807
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is `null` or its alpha value is 0.
2808
+ * Otherwise alpha of {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is used.
2809
+ *
2810
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2811
+ */
2812
+ get fillColor(): PdfViewing.Pdf.Annotations.Color | null;
2813
+ /**
2814
+ * The filling paint (Setter)
2815
+ *
2816
+ * If `null` then the rectangle is not filled.
2817
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is `null` or its alpha value is 0.
2818
+ * Otherwise alpha of {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is used.
2819
+ *
2820
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2821
+ */
2822
+ set fillColor(fillColor: PdfViewing.Pdf.Annotations.Color | null);
2823
+ }
2824
+ /**
2825
+ * An ellipse drawing annotation
2826
+ *
2827
+ */
2828
+ class EllipseAnnotation extends PdfViewing.Pdf.Annotations.DrawingAnnotation {
2829
+ /**
2830
+ * Create an ellipse annotation.
2831
+ *
2832
+ * The returned ellipse annotation is not yet part of any page.
2833
+ * It can be added to a page's list of annotations.
2834
+ * @param boundingBox
2835
+ * The location on the page.
2836
+ * @param strokeColor
2837
+ * The color used for stroking and the popup.
2838
+ * The alpha value of this color is used for stroking and filling.
2839
+ * Set `null` or a color with alpha = 0 to make stroke transparent.
2840
+ * @param annotationStroke
2841
+ * The stroking style for all lines. The color is also used for the popup.
2842
+ * @param borderStyleType
2843
+ * The style of the stroked border
2844
+ * @param fillColor
2845
+ * The paint used for filling the rectangle.
2846
+ * If `null` then the rectangle is not filled.
2847
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.EllipseAnnotation.create strokeColor} is `null` or its alpha value is 0.
2848
+ * @returns
2849
+ * The newly created ellipse annotation.
2850
+ */
2851
+ static create(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage, strokeColor: PdfViewing.Pdf.Annotations.Color | null, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke, borderStyleType: PdfViewing.Pdf.Annotations.BorderStyleType, fillColor: PdfViewing.Pdf.Annotations.Color | null): PdfViewing.Pdf.Annotations.EllipseAnnotation;
2852
+ /**
2853
+ *
2854
+ */
2855
+ get borderStyleType(): PdfViewing.Pdf.Annotations.BorderStyleType;
2856
+ /**
2857
+ *
2858
+ */
2859
+ set borderStyleType(borderStyleType: PdfViewing.Pdf.Annotations.BorderStyleType);
2860
+ /**
2861
+ * The filling paint (Getter)
2862
+ *
2863
+ * If `null` then the ellipse is not filled.
2864
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is `null` or its alpha value is 0.
2865
+ * Otherwise alpha of {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is used.
2866
+ *
2867
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2868
+ */
2869
+ get fillColor(): PdfViewing.Pdf.Annotations.Color | null;
2870
+ /**
2871
+ * The filling paint (Setter)
2872
+ *
2873
+ * If `null` then the ellipse is not filled.
2874
+ * The alpha value of this color only takes effect if {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is `null` or its alpha value is 0.
2875
+ * Otherwise alpha of {@link PdfViewing.Pdf.Annotations.DrawingAnnotation.strokeColor } is used.
2876
+ *
2877
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2878
+ */
2879
+ set fillColor(fillColor: PdfViewing.Pdf.Annotations.Color | null);
2880
+ }
2881
+ /**
2882
+ * An annotation that marks up part(s) of a text
2883
+ *
2884
+ */
2885
+ class TextMarkup extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
2886
+ /**
2887
+ * The Color of the annotation and the popup (Getter)
2888
+ *
2889
+ *
2890
+ *
2891
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2892
+ */
2893
+ get color(): PdfViewing.Pdf.Annotations.Color;
2894
+ /**
2895
+ * The Color of the annotation and the popup (Setter)
2896
+ *
2897
+ *
2898
+ *
2899
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2900
+ */
2901
+ set color(color: PdfViewing.Pdf.Annotations.Color);
2902
+ /**
2903
+ * The pop-up (Getter)
2904
+ *
2905
+ *
2906
+ *
2907
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2908
+ */
2909
+ get popup(): PdfViewing.Pdf.Annotations.Popup | null;
2910
+ /**
2911
+ * Area of all marked text.
2912
+ *
2913
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2914
+ */
2915
+ get markupArea(): PdfViewing.Pdf.Geometry.Real.QuadrilateralList;
2916
+ /**
2917
+ * Area of all marked text.
2918
+ *
2919
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2920
+ * @throws {@link PdfViewing.ArgumentError} if the list is `null`
2921
+ * @throws {@link PdfViewing.ArgumentError} if the list contains no quadrilaterals
2922
+ */
2923
+ set markupArea(markupArea: PdfViewing.Pdf.Geometry.Real.QuadrilateralList);
2924
+ /**
2925
+ * Text which is highlighted
2926
+ *
2927
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
2928
+ */
2929
+ get markedText(): string;
2930
+ }
2931
+ /**
2932
+ * An text highlighting annotation
2933
+ *
2934
+ */
2935
+ class Highlight extends PdfViewing.Pdf.Annotations.TextMarkup {
2936
+ /**
2937
+ * Create a Highlight annotation.
2938
+ *
2939
+ * The returned rectangle annotation is not yet part of any page.
2940
+ * It can be added to a page's list of annotations.
2941
+ * @param markupArea
2942
+ * List of areas to be highlighted.
2943
+ * @param color
2944
+ * The color used for the highlighted area and the popup.
2945
+ * @returns
2946
+ * The newly created highlight annotation.
2947
+ *
2948
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.Highlight.create markupArea} argument is `null`
2949
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.Highlight.create markupArea} list contains no quadrilaterals
2950
+ */
2951
+ static create(markupArea: PdfViewing.Pdf.Geometry.Real.QuadrilateralList, color: PdfViewing.Pdf.Annotations.Color): PdfViewing.Pdf.Annotations.Highlight;
2952
+ }
2953
+ /**
2954
+ * An text underlining annotation
2955
+ *
2956
+ */
2957
+ class Underline extends PdfViewing.Pdf.Annotations.TextMarkup {
2958
+ /**
2959
+ * Create a Highlight annotation.
2960
+ *
2961
+ * The returned rectangle annotation is not yet part of any page.
2962
+ * It can be added to a page's list of annotations.
2963
+ * @param markupArea
2964
+ * List of areas to be underlined. The underline is drawn on the baseline of each quadpoint.
2965
+ * @param color
2966
+ * The color used for the line and the popup.
2967
+ * @returns
2968
+ * The newly created Underline annotation.
2969
+ *
2970
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.Underline.create markupArea} argument is `null`
2971
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.Underline.create markupArea} list contains no quadrilaterals
2972
+ */
2973
+ static create(markupArea: PdfViewing.Pdf.Geometry.Real.QuadrilateralList, color: PdfViewing.Pdf.Annotations.Color): PdfViewing.Pdf.Annotations.Underline;
2974
+ }
2975
+ /**
2976
+ * An annotation for striking through text
2977
+ *
2978
+ */
2979
+ class StrikeThrough extends PdfViewing.Pdf.Annotations.TextMarkup {
2980
+ /**
2981
+ * Create a Highlight annotation.
2982
+ *
2983
+ * The returned rectangle annotation is not yet part of any page.
2984
+ * It can be added to a page's list of annotations.
2985
+ * @param markupArea
2986
+ * List of areas to be striked through. The line is drawn in the middle of each quadpoints, parallel to its baseline.
2987
+ * @param color
2988
+ * The color used for the line and the popup.
2989
+ * @returns
2990
+ * The newly created strikethrough annotation.
2991
+ *
2992
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.StrikeThrough.create markupArea} argument is `null`
2993
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.StrikeThrough.create markupArea} list contains no quadrilaterals
2994
+ */
2995
+ static create(markupArea: PdfViewing.Pdf.Geometry.Real.QuadrilateralList, color: PdfViewing.Pdf.Annotations.Color): PdfViewing.Pdf.Annotations.StrikeThrough;
2996
+ }
2997
+ /**
2998
+ * A squiggly text underlining annotation
2999
+ *
3000
+ */
3001
+ class Squiggly extends PdfViewing.Pdf.Annotations.TextMarkup {
3002
+ /**
3003
+ * Create a Highlight annotation.
3004
+ *
3005
+ * The returned rectangle annotation is not yet part of any page.
3006
+ * It can be added to a page's list of annotations.
3007
+ * @param markupArea
3008
+ * List of areas to be underlined with a squiggly line. The squiggly line is drawn on the baseline of each quadpoint.
3009
+ * @param color
3010
+ * The color used for the line and the popup.
3011
+ * @returns
3012
+ * The newly created Squiggly annotation.
3013
+ *
3014
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.Squiggly.create markupArea} argument is `null`
3015
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Annotations.Squiggly.create markupArea} list contains no quadrilaterals
3016
+ */
3017
+ static create(markupArea: PdfViewing.Pdf.Geometry.Real.QuadrilateralList, color: PdfViewing.Pdf.Annotations.Color): PdfViewing.Pdf.Annotations.Squiggly;
3018
+ }
3019
+ /**
3020
+ * An annotation that marks a point to insert text
3021
+ *
3022
+ */
3023
+ class TextInsert extends PdfViewing.Pdf.Annotations.MarkupAnnotation {
3024
+ /**
3025
+ * The Color for the annotation and the popup (Getter)
3026
+ *
3027
+ *
3028
+ *
3029
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3030
+ */
3031
+ get color(): PdfViewing.Pdf.Annotations.Color;
3032
+ /**
3033
+ * The Color for the annotation and the popup (Setter)
3034
+ *
3035
+ *
3036
+ *
3037
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3038
+ */
3039
+ set color(color: PdfViewing.Pdf.Annotations.Color);
3040
+ /**
3041
+ * The pop-up (Getter)
3042
+ *
3043
+ *
3044
+ *
3045
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3046
+ */
3047
+ get popup(): PdfViewing.Pdf.Annotations.Popup | null;
3048
+ }
3049
+ /**
3050
+ * A link
3051
+ *
3052
+ */
3053
+ class Link extends PdfViewing.Pdf.Annotations.Annotation {
3054
+ /**
3055
+ * The link's border stroke (Setter)
3056
+ *
3057
+ * This property defines if and how a rectangular border is drawn for the link.
3058
+ *
3059
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3060
+ * @throws {@link PdfViewing.ArgumentError} the given {@link PdfViewing.Pdf.Annotations.AnnotationStroke } object is `null`
3061
+ */
3062
+ set annotationStroke(annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke);
3063
+ /**
3064
+ * The Color for the annotation (Getter)
3065
+ *
3066
+ *
3067
+ *
3068
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3069
+ */
3070
+ get color(): PdfViewing.Pdf.Annotations.Color;
3071
+ /**
3072
+ * The Color for the annotation (Setter)
3073
+ *
3074
+ *
3075
+ *
3076
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3077
+ */
3078
+ set color(color: PdfViewing.Pdf.Annotations.Color);
3079
+ /**
3080
+ * The link area (Getter)
3081
+ *
3082
+ * This list of {@link PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage }s defines the active link area on the page.
3083
+ * A PDF viewer executes the appropriate action,
3084
+ * such as navigating to a destination or opening a web browser,
3085
+ * when a mouse click falls inside of this area.
3086
+ *
3087
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3088
+ */
3089
+ get activeArea(): PdfViewing.Pdf.Geometry.Real.QuadrilateralList;
3090
+ /**
3091
+ * The link area (Setter)
3092
+ *
3093
+ * This list of {@link PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage }s defines the active link area on the page.
3094
+ * A PDF viewer executes the appropriate action,
3095
+ * such as navigating to a destination or opening a web browser,
3096
+ * when a mouse click falls inside of this area.
3097
+ *
3098
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3099
+ * @throws {@link PdfViewing.ArgumentError} if the list is `null`.
3100
+ * @throws {@link PdfViewing.ArgumentError} if the list contains no quadrilaterals.
3101
+ */
3102
+ set activeArea(activeArea: PdfViewing.Pdf.Geometry.Real.QuadrilateralList);
3103
+ }
3104
+ /**
3105
+ * A document-wide link
3106
+ *
3107
+ */
3108
+ class InternalLink extends PdfViewing.Pdf.Annotations.Link {
3109
+ /**
3110
+ * The link target (Getter)
3111
+ *
3112
+ *
3113
+ *
3114
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3115
+ * @throws {@link PdfViewing.InvalidOperationError} if the link has no destination
3116
+ */
3117
+ get destination(): PdfViewing.Pdf.Navigation.Destination | null;
3118
+ }
3119
+ /**
3120
+ * An external link
3121
+ *
3122
+ */
3123
+ class WebLink extends PdfViewing.Pdf.Annotations.Link {
3124
+ /**
3125
+ * Create a new external link
3126
+ *
3127
+ * The returned WebLink annotation is not yet part of any page.
3128
+ * It can be added to a page's list of annotations.
3129
+ * @param boundingBox
3130
+ * The location on the page.
3131
+ * @param annotationStroke
3132
+ * The given AnnotationStroke defines if and how a rectangular border is drawn for the link.
3133
+ * @param uri
3134
+ * The link target
3135
+ * @returns
3136
+ * The newly created object
3137
+ */
3138
+ static create(boundingBox: PdfViewing.Pdf.Geometry.Real.RectangleOnPage, annotationStroke: PdfViewing.Pdf.Annotations.AnnotationStroke, uri: string): PdfViewing.Pdf.Annotations.WebLink;
3139
+ /**
3140
+ * The link target (Getter)
3141
+ *
3142
+ *
3143
+ *
3144
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3145
+ */
3146
+ get uri(): string;
3147
+ /**
3148
+ * The link target (Setter)
3149
+ *
3150
+ *
3151
+ *
3152
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3153
+ */
3154
+ set uri(uri: string);
3155
+ }
3156
+ /**
3157
+ * A link to an embedded PDF document
3158
+ *
3159
+ */
3160
+ class EmbeddedPdfLink extends PdfViewing.Pdf.Annotations.Link {
3161
+ /**
3162
+ * The opening behavior (Getter)
3163
+ *
3164
+ * This defines the viewer's behavior when opening the target PDF document.
3165
+ * - `null`: The viewer uses its default behavior.
3166
+ * - `true`: Open the document in an additional window.
3167
+ * - `false`: Replace the parent document with the embedded document.
3168
+ *
3169
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3170
+ */
3171
+ get newWindow(): boolean | null;
3172
+ /**
3173
+ * The opening behavior (Setter)
3174
+ *
3175
+ * This defines the viewer's behavior when opening the target PDF document.
3176
+ * - `null`: The viewer uses its default behavior.
3177
+ * - `true`: Open the document in an additional window.
3178
+ * - `false`: Replace the parent document with the embedded document.
3179
+ *
3180
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3181
+ */
3182
+ set newWindow(newWindow: boolean | null);
3183
+ }
3184
+ /**
3185
+ *
3186
+ */
3187
+ class AnnotationStroke extends Internal.NativeObject {
3188
+ /**
3189
+ *
3190
+ */
3191
+ constructor();
3192
+ /**
3193
+ * Close the object
3194
+ *
3195
+ * Release all native resources associated with the object.
3196
+ */
3197
+ close(): void;
3198
+ /**
3199
+ * Width of the line in points
3200
+ *
3201
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3202
+ */
3203
+ get lineWidth(): number;
3204
+ /**
3205
+ * Width of the line in points
3206
+ *
3207
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3208
+ */
3209
+ set lineWidth(lineWidth: number);
3210
+ /**
3211
+ * Describes the sequence of dashlength and gaplength of the dashing pattern, starting with a dash in points. The pattern is repeated.
3212
+ * Leaving the {@link PdfViewing.Pdf.Annotations.AnnotationStroke.dashArray } empty results in a solid line.
3213
+ * The {@link PdfViewing.Pdf.Annotations.AnnotationStroke.dashArray } is ignored if the Annotation has a {@link PdfViewing.Pdf.Annotations.BorderStyleType } property that is not set to {@link PdfViewing.Pdf.Annotations.BorderStyleType.Lined }.
3214
+ *
3215
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3216
+ */
3217
+ get dashArray(): number[];
3218
+ /**
3219
+ * Describes the sequence of dashlength and gaplength of the dashing pattern, starting with a dash in points. The pattern is repeated.
3220
+ * Leaving the {@link PdfViewing.Pdf.Annotations.AnnotationStroke.dashArray } empty results in a solid line.
3221
+ * The {@link PdfViewing.Pdf.Annotations.AnnotationStroke.dashArray } is ignored if the Annotation has a {@link PdfViewing.Pdf.Annotations.BorderStyleType } property that is not set to {@link PdfViewing.Pdf.Annotations.BorderStyleType.Lined }.
3222
+ *
3223
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3224
+ */
3225
+ set dashArray(dashArray: number[]);
3226
+ }
3227
+ /**
3228
+ *
3229
+ */
3230
+ class AnnotationList extends Internal.NativeObject implements List<PdfViewing.Pdf.Annotations.Annotation> {
3231
+ /**
3232
+ * Close the object
3233
+ *
3234
+ * Release all native resources associated with the object.
3235
+ */
3236
+ close(): void;
3237
+ remove(element: PdfViewing.Pdf.Annotations.Annotation): boolean;
3238
+ add(element: PdfViewing.Pdf.Annotations.Annotation): boolean;
3239
+ addRange(inputList: AnnotationList): boolean;
3240
+ set(index: number, element: PdfViewing.Pdf.Annotations.Annotation): void;
3241
+ clear(): void;
3242
+ get(index: number): PdfViewing.Pdf.Annotations.Annotation;
3243
+ getRange(index: number, count: number): AnnotationList;
3244
+ get size(): number;
3245
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Annotations.Annotation>;
3246
+ }
3247
+ }
3248
+ namespace Forms {
3249
+ /**
3250
+ * A form field widget
3251
+ *
3252
+ */
3253
+ class Widget extends PdfViewing.Pdf.Annotations.Annotation {
3254
+ /**
3255
+ * Editing this widget is not allowed.
3256
+ */
3257
+ get readOnly(): boolean;
3258
+ /**
3259
+ * When filling out form this field is not optional.
3260
+ */
3261
+ get required(): boolean;
3262
+ }
3263
+ /**
3264
+ *
3265
+ * An empty box which can be marked with a checkmark.
3266
+ */
3267
+ class CheckBox extends PdfViewing.Pdf.Forms.Widget {
3268
+ /**
3269
+ *
3270
+ * Toggle whether the given box is checked.
3271
+ */
3272
+ push(): void;
3273
+ /**
3274
+ * Whether the box is checked
3275
+ *
3276
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3277
+ */
3278
+ get isChecked(): boolean;
3279
+ }
3280
+ /**
3281
+ *
3282
+ * A radio button allows to choose one of multiple choices by selecting one of the buttons in a radio button group.
3283
+ */
3284
+ class RadioButton extends PdfViewing.Pdf.Forms.Widget {
3285
+ /**
3286
+ *
3287
+ * Toggle whether the given box is checked.
3288
+ * If the radio button is not selected, then select it.
3289
+ * If the radio button is selected and the radio button has {@link PdfViewing.Pdf.Forms.RadioButton.noSelectionAllowed } set to `true`, then deselect the radio button.
3290
+ */
3291
+ push(): void;
3292
+ /**
3293
+ * Whether this radiobutton may be deselected, resulting in no radiobuttons of this group being selected.
3294
+ *
3295
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3296
+ */
3297
+ get noSelectionAllowed(): boolean;
3298
+ /**
3299
+ * Whether this button is selected.
3300
+ * Note that selecting one radio button might deselect other radio buttons.
3301
+ *
3302
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3303
+ */
3304
+ get selected(): boolean;
3305
+ }
3306
+ /**
3307
+ *
3308
+ * A text box allows the entry of arbitrary text.
3309
+ */
3310
+ class TextBox extends PdfViewing.Pdf.Forms.Widget {
3311
+ /**
3312
+ * Whether horizontal scrolling of text is allowed in the text box
3313
+ *
3314
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3315
+ */
3316
+ get scrollAllowed(): boolean;
3317
+ /**
3318
+ * Whether the text is may be shown on multiple lines in the text box
3319
+ *
3320
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3321
+ */
3322
+ get multilineAllowed(): boolean;
3323
+ /**
3324
+ * Interpret the given string as rich-text
3325
+ *
3326
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3327
+ */
3328
+ get textIsRichText(): boolean;
3329
+ /**
3330
+ * Whether text should be monospaced
3331
+ *
3332
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3333
+ */
3334
+ get comb(): boolean;
3335
+ /**
3336
+ * The maximum amount of characters that {@link PdfViewing.Pdf.Forms.TextBox.text } may contain
3337
+ *
3338
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3339
+ */
3340
+ get maxLength(): number;
3341
+ /**
3342
+ * The text currently set in the text box
3343
+ *
3344
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3345
+ */
3346
+ get text(): string;
3347
+ /**
3348
+ * The text currently set in the text box
3349
+ *
3350
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3351
+ * @throws {@link PdfViewing.ArgumentError} if the given {@link PdfViewing.Pdf.Forms.TextBox.maxLength } was exceeded
3352
+ */
3353
+ set text(text: string);
3354
+ }
3355
+ /**
3356
+ *
3357
+ * A list box shows a scrollable list of choices in a box.
3358
+ */
3359
+ class ListBox extends PdfViewing.Pdf.Forms.Widget {
3360
+ /**
3361
+ * Whether multiple options may be selected.
3362
+ *
3363
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3364
+ */
3365
+ get multiSelectAllowed(): boolean;
3366
+ /**
3367
+ * List of strings which can be chosen for this box.
3368
+ */
3369
+ get options(): PdfViewing.StringList;
3370
+ /**
3371
+ * This is a set of indices indicating which of the {@link PdfViewing.Pdf.Forms.ListBox.options } are currently chosen.
3372
+ * Index values may range from 0 up to size of {@link PdfViewing.Pdf.Forms.ListBox.options } - 1.
3373
+ */
3374
+ get chosen(): PdfViewing.IntegerSet;
3375
+ /**
3376
+ * This is a set of indices indicating which of the {@link PdfViewing.Pdf.Forms.ListBox.options } are currently chosen.
3377
+ * Index values may range from 0 up to size of {@link PdfViewing.Pdf.Forms.ListBox.options } - 1.
3378
+ *
3379
+ * @throws {@link PdfViewing.ArgumentError} An index is not in the allowed range.
3380
+ */
3381
+ set chosen(chosen: PdfViewing.IntegerSet);
3382
+ }
3383
+ /**
3384
+ *
3385
+ * A combo box shows a scrollable list of choices in a drop-down menu potentially combined with an editable custom entry.
3386
+ */
3387
+ class ComboBox extends PdfViewing.Pdf.Forms.Widget {
3388
+ /**
3389
+ * Whether the combo box supports an editable custom entry instead of one of the {@link PdfViewing.Pdf.Forms.ComboBox.options }
3390
+ *
3391
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3392
+ */
3393
+ get customEntryAllowed(): boolean;
3394
+ /**
3395
+ * If {@link PdfViewing.Pdf.Forms.ComboBox.customEntryAllowed } is set a custom entry can be used instead of the entries in {@link PdfViewing.Pdf.Forms.ComboBox.options }.
3396
+ * Setting {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to `null`.
3397
+ * Conversely, setting {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to `null`.
3398
+ *
3399
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3400
+ */
3401
+ get customEntry(): string | null;
3402
+ /**
3403
+ * If {@link PdfViewing.Pdf.Forms.ComboBox.customEntryAllowed } is set a custom entry can be used instead of the entries in {@link PdfViewing.Pdf.Forms.ComboBox.options }.
3404
+ * Setting {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to `null`.
3405
+ * Conversely, setting {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to `null`.
3406
+ *
3407
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3408
+ * @throws {@link PdfViewing.NotSupportedError} Setting a Custom Entry is only allowed if {@link PdfViewing.Pdf.Forms.ComboBox.customEntryAllowed } is set to `true`.
3409
+ * @throws {@link PdfViewing.ArgumentError} {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } may not be set to `null`.
3410
+ */
3411
+ set customEntry(customEntry: string | null);
3412
+ /**
3413
+ * List of strings which can be chosen for this box.
3414
+ */
3415
+ get options(): PdfViewing.StringList;
3416
+ /**
3417
+ * The index of the currently chosen Option from {@link PdfViewing.Pdf.Forms.ComboBox.options }.
3418
+ * Setting {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to `null`.
3419
+ * Conversely, setting {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to `null`.
3420
+ */
3421
+ get chosen(): number | null;
3422
+ /**
3423
+ * The index of the currently chosen Option from {@link PdfViewing.Pdf.Forms.ComboBox.options }.
3424
+ * Setting {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to `null`.
3425
+ * Conversely, setting {@link PdfViewing.Pdf.Forms.ComboBox.customEntry } to any value other than `null` automatically sets {@link PdfViewing.Pdf.Forms.ComboBox.chosen } to `null`.
3426
+ *
3427
+ * @throws {@link PdfViewing.ArgumentError} Index is not in the allowed range.
3428
+ * @throws {@link PdfViewing.ArgumentError} {@link PdfViewing.Pdf.Forms.ComboBox.chosen } may not be set to `null`.
3429
+ */
3430
+ set chosen(chosen: number | null);
3431
+ }
3432
+ }
3433
+ namespace Geometry {
3434
+ /**
3435
+ *
3436
+ * Values represent the Rotation in degrees clockwise.
3437
+ */
3438
+ enum Rotation {
3439
+ /**
3440
+ *
3441
+ */
3442
+ NoRotation = 0,
3443
+ /**
3444
+ *
3445
+ */
3446
+ Clockwise = 90,
3447
+ /**
3448
+ *
3449
+ */
3450
+ UpsideDown = 180,
3451
+ /**
3452
+ *
3453
+ */
3454
+ CounterClockwise = 270
3455
+ }
3456
+ namespace Real {
3457
+ /**
3458
+ *
3459
+ */
3460
+ class Size extends Internal.NativeBase {
3461
+ /**
3462
+ * The width (horizontal size).
3463
+ *
3464
+ */
3465
+ width: number;
3466
+ /**
3467
+ * The height (vertical size).
3468
+ *
3469
+ */
3470
+ height: number;
3471
+ constructor(width: number, height: number);
3472
+ equals(obj: Size | null): boolean;
3473
+ }
3474
+ /**
3475
+ *
3476
+ */
3477
+ class Point extends Internal.NativeBase {
3478
+ /**
3479
+ * The X value (horizontal coordinate).
3480
+ *
3481
+ */
3482
+ x: number;
3483
+ /**
3484
+ * The Y value (vertical coordinate).
3485
+ *
3486
+ */
3487
+ y: number;
3488
+ constructor(x: number, y: number);
3489
+ equals(obj: Point | null): boolean;
3490
+ }
3491
+ /**
3492
+ *
3493
+ * A point relative to a PDF Page in PDF coordinates (double), the origin is at the bottom-left of the page, x increasing to the right and y increasing upwards.
3494
+ */
3495
+ class PointOnPage extends Internal.NativeBase {
3496
+ /**
3497
+ *
3498
+ */
3499
+ pageNumber: number;
3500
+ /**
3501
+ *
3502
+ */
3503
+ x: number;
3504
+ /**
3505
+ *
3506
+ */
3507
+ y: number;
3508
+ constructor(pageNumber: number, x: number, y: number);
3509
+ equals(obj: PointOnPage | null): boolean;
3510
+ }
3511
+ /**
3512
+ *
3513
+ * A quadrilateral is a polygon with four sides and four corners.
3514
+ * When associated with text, the horizontal text writing direction goes from {@link PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage.pageNumber } to {@link PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage.pageNumber }.
3515
+ */
3516
+ class QuadrilateralOnPage extends Internal.NativeBase {
3517
+ /**
3518
+ *
3519
+ */
3520
+ pageNumber: number;
3521
+ /**
3522
+ *
3523
+ */
3524
+ bottomLeft: PdfViewing.Pdf.Geometry.Real.Point;
3525
+ /**
3526
+ *
3527
+ */
3528
+ bottomRight: PdfViewing.Pdf.Geometry.Real.Point;
3529
+ /**
3530
+ *
3531
+ */
3532
+ topRight: PdfViewing.Pdf.Geometry.Real.Point;
3533
+ /**
3534
+ *
3535
+ */
3536
+ topLeft: PdfViewing.Pdf.Geometry.Real.Point;
3537
+ constructor(pageNumber: number, bottomLeft: PdfViewing.Pdf.Geometry.Real.Point, bottomRight: PdfViewing.Pdf.Geometry.Real.Point, topRight: PdfViewing.Pdf.Geometry.Real.Point, topLeft: PdfViewing.Pdf.Geometry.Real.Point);
3538
+ equals(obj: QuadrilateralOnPage | null): boolean;
3539
+ }
3540
+ /**
3541
+ *
3542
+ * A rectangle relative to a PDF Page in PDF coordinates (double), the origin is at the bottom-left of the page , x increasing to the right and y increasing upwards
3543
+ */
3544
+ class RectangleOnPage extends Internal.NativeBase {
3545
+ /**
3546
+ *
3547
+ */
3548
+ pageNumber: number;
3549
+ /**
3550
+ *
3551
+ */
3552
+ x: number;
3553
+ /**
3554
+ *
3555
+ */
3556
+ y: number;
3557
+ /**
3558
+ *
3559
+ */
3560
+ width: number;
3561
+ /**
3562
+ *
3563
+ */
3564
+ height: number;
3565
+ constructor(pageNumber: number, x: number, y: number, width: number, height: number);
3566
+ equals(obj: RectangleOnPage | null): boolean;
3567
+ }
3568
+ /**
3569
+ *
3570
+ * A point relative to a PDF Page in PDF coordinates (double), the origin is at the bottom-left of the page, x increasing to the right and y increasing upwards.
3571
+ * This point will join 2 lines.
3572
+ */
3573
+ class Vertex extends Internal.NativeBase {
3574
+ /**
3575
+ *
3576
+ */
3577
+ pageNumber: number;
3578
+ /**
3579
+ *
3580
+ */
3581
+ x: number;
3582
+ /**
3583
+ *
3584
+ */
3585
+ y: number;
3586
+ /**
3587
+ *
3588
+ * Operation on the vertex.
3589
+ */
3590
+ operator: PdfViewing.Pdf.Geometry.Real.PathOperation;
3591
+ constructor(pageNumber: number, x: number, y: number, operator: PdfViewing.Pdf.Geometry.Real.PathOperation);
3592
+ equals(obj: Vertex | null): boolean;
3593
+ }
3594
+ /**
3595
+ *
3596
+ * Values represent the type of path operation on the vertex.
3597
+ */
3598
+ enum PathOperation {
3599
+ /**
3600
+ *
3601
+ */
3602
+ MoveTo = 0,
3603
+ /**
3604
+ *
3605
+ */
3606
+ LineTo = 1
3607
+ }
3608
+ /**
3609
+ *
3610
+ * A List of {@link PdfViewing.Pdf.Geometry.Real.RectangleOnPage }s
3611
+ */
3612
+ class RectangleOnPageList extends Internal.NativeObject implements List<PdfViewing.Pdf.Geometry.Real.RectangleOnPage> {
3613
+ /**
3614
+ * Close the object
3615
+ *
3616
+ * Release all native resources associated with the object.
3617
+ */
3618
+ close(): void;
3619
+ remove(element: PdfViewing.Pdf.Geometry.Real.RectangleOnPage): boolean;
3620
+ add(element: PdfViewing.Pdf.Geometry.Real.RectangleOnPage): boolean;
3621
+ addRange(inputList: RectangleOnPageList): boolean;
3622
+ set(index: number, element: PdfViewing.Pdf.Geometry.Real.RectangleOnPage): void;
3623
+ clear(): void;
3624
+ get(index: number): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
3625
+ getRange(index: number, count: number): RectangleOnPageList;
3626
+ get size(): number;
3627
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Geometry.Real.RectangleOnPage>;
3628
+ }
3629
+ /**
3630
+ *
3631
+ * A path described by a series of vertices.
3632
+ */
3633
+ class Path extends Internal.NativeObject {
3634
+ /**
3635
+ *
3636
+ */
3637
+ constructor();
3638
+ /**
3639
+ * List of vertices joined as a path.
3640
+ *
3641
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3642
+ */
3643
+ get vertices(): PdfViewing.Pdf.Geometry.Real.VertexList;
3644
+ /**
3645
+ * List of vertices joined as a path.
3646
+ *
3647
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3648
+ * @throws {@link PdfViewing.ArgumentError} The vertex list starts with a {@link PdfViewing.Pdf.Geometry.Real.PathOperation.LineTo }
3649
+ * or contains two successive {@link PdfViewing.Pdf.Geometry.Real.PathOperation.MoveTo }s
3650
+ */
3651
+ set vertices(vertices: PdfViewing.Pdf.Geometry.Real.VertexList);
3652
+ }
3653
+ /**
3654
+ *
3655
+ * A List of {@link PdfViewing.Pdf.Geometry.Real.RectangleOnPage }s
3656
+ */
3657
+ class PathGenerator extends Internal.NativeObject {
3658
+ /**
3659
+ * Create a new path generator for appending to a path.
3660
+ *
3661
+ * @param path
3662
+ * the path object
3663
+ *
3664
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Geometry.Real.PathGenerator. path} argument is `null`
3665
+ * @throws {@link PdfViewing.ArgumentError} if the {@link PdfViewing.Pdf.Geometry.Real.PathGenerator. path} object has already been closed
3666
+ */
3667
+ constructor(path: PdfViewing.Pdf.Geometry.Real.Path);
3668
+ /**
3669
+ * Close the object
3670
+ *
3671
+ * Release all native resources associated with the object.
3672
+ */
3673
+ close(): void;
3674
+ /**
3675
+ * Move the current position.
3676
+ *
3677
+ * Begin a new subpath by moving the current point to the specified coordinates,
3678
+ * omitting any connecting line segment.
3679
+ * If the previous path construction operator in the current path was also MoveTo,
3680
+ * the new MoveTo overrides it;
3681
+ * no vestige of the previous MoveTo operation remains in the path.
3682
+ * @param target
3683
+ * the target coordinates
3684
+ *
3685
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3686
+ * @throws {@link PdfViewing.InvalidOperationError} if the path object has already been closed
3687
+ */
3688
+ moveTo(target: PdfViewing.Pdf.Geometry.Real.Point): void;
3689
+ /**
3690
+ * Draw a line.
3691
+ *
3692
+ * Append a straight line segment from the current point to the target coordinates.
3693
+ * The current position is changed to the target position.
3694
+ * @param target
3695
+ * the target coordinates
3696
+ *
3697
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3698
+ * @throws {@link PdfViewing.InvalidOperationError} if the path object has already been closed
3699
+ */
3700
+ lineTo(target: PdfViewing.Pdf.Geometry.Real.Point): void;
3701
+ /**
3702
+ * Draw a bezier curve.
3703
+ *
3704
+ * Append a cubic Bézier curve to the current path.
3705
+ * The curve extends from the current point to the {@link PdfViewing.Pdf.Geometry.Real.PathGenerator.bezierTo target} position,
3706
+ * using {@link PdfViewing.Pdf.Geometry.Real.PathGenerator.bezierTo ctrl1} and {@link PdfViewing.Pdf.Geometry.Real.PathGenerator.bezierTo ctrl2} as the Bézier control points.
3707
+ * The current position is changed to the target position.
3708
+ * @param ctrl1
3709
+ * the first bezier control point
3710
+ * @param ctrl2
3711
+ * the second bezier control point
3712
+ * @param target
3713
+ * the target coordinates
3714
+ *
3715
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3716
+ * @throws {@link PdfViewing.InvalidOperationError} if the path object has already been closed
3717
+ */
3718
+ bezierTo(ctrl1: PdfViewing.Pdf.Geometry.Real.Point, ctrl2: PdfViewing.Pdf.Geometry.Real.Point, target: PdfViewing.Pdf.Geometry.Real.Point): void;
3719
+ /**
3720
+ * Close the current subpath.
3721
+ *
3722
+ * Close the current subpath by appending a straight line segment from the
3723
+ * current point to the starting point of the subpath.
3724
+ * This operator terminates the current subpath;
3725
+ * appending another segment to the current path will begin a new subpath,
3726
+ * even if the new segment begins at the endpoint reached by the closeSubpath() operation.
3727
+ * If the current subpath is already closed, CloseSubpath() does nothing.
3728
+ *
3729
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3730
+ * @throws {@link PdfViewing.InvalidOperationError} if the path object has already been closed
3731
+ */
3732
+ closeSubpath(): void;
3733
+ /**
3734
+ * Append a rectangle to the current path as a complete subpath.
3735
+ *
3736
+ * @param rect
3737
+ * the rectangle to be added to the path
3738
+ *
3739
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3740
+ * @throws {@link PdfViewing.InvalidOperationError} if the path object has already been closed
3741
+ */
3742
+ addRectangle(rect: PdfViewing.Pdf.Geometry.Real.RectangleOnPage): void;
3743
+ }
3744
+ /**
3745
+ *
3746
+ */
3747
+ class QuadrilateralList extends Internal.NativeObject implements List<PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage> {
3748
+ /**
3749
+ *
3750
+ */
3751
+ constructor();
3752
+ /**
3753
+ * Close the object
3754
+ *
3755
+ * Release all native resources associated with the object.
3756
+ */
3757
+ close(): void;
3758
+ /**
3759
+ *
3760
+ * @param pointOnPage
3761
+ * @returns
3762
+ *
3763
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3764
+ */
3765
+ contains(pointOnPage: PdfViewing.Pdf.Geometry.Real.PointOnPage): boolean;
3766
+ /**
3767
+ * The smallest rectangle which contains all quadrilaterals of this list.
3768
+ *
3769
+ * @throws {@link PdfViewing.ArgumentError} Property may not be read if the list is empty.
3770
+ */
3771
+ get boundingBox(): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
3772
+ remove(element: PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage): boolean;
3773
+ add(element: PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage): boolean;
3774
+ addRange(inputList: QuadrilateralList): boolean;
3775
+ set(index: number, element: PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage): void;
3776
+ clear(): void;
3777
+ get(index: number): PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage;
3778
+ getRange(index: number, count: number): QuadrilateralList;
3779
+ get size(): number;
3780
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage>;
3781
+ }
3782
+ /**
3783
+ *
3784
+ */
3785
+ class VertexList extends Internal.NativeObject implements List<PdfViewing.Pdf.Geometry.Real.Vertex> {
3786
+ /**
3787
+ *
3788
+ */
3789
+ constructor();
3790
+ remove(element: PdfViewing.Pdf.Geometry.Real.Vertex): boolean;
3791
+ add(element: PdfViewing.Pdf.Geometry.Real.Vertex): boolean;
3792
+ addRange(inputList: VertexList): boolean;
3793
+ set(index: number, element: PdfViewing.Pdf.Geometry.Real.Vertex): void;
3794
+ clear(): void;
3795
+ get(index: number): PdfViewing.Pdf.Geometry.Real.Vertex;
3796
+ getRange(index: number, count: number): VertexList;
3797
+ get size(): number;
3798
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Geometry.Real.Vertex>;
3799
+ }
3800
+ }
3801
+ namespace Integer {
3802
+ /**
3803
+ *
3804
+ */
3805
+ class Size extends Internal.NativeBase {
3806
+ /**
3807
+ * The Width value (horizontal size).
3808
+ *
3809
+ */
3810
+ width: number;
3811
+ /**
3812
+ * The Height value (vertical size).
3813
+ *
3814
+ */
3815
+ height: number;
3816
+ constructor(width: number, height: number);
3817
+ equals(obj: Size | null): boolean;
3818
+ }
3819
+ /**
3820
+ *
3821
+ * Describes the current position of the viewport on the document. Origin top left.
3822
+ */
3823
+ class ScrollPosition extends Internal.NativeBase {
3824
+ /**
3825
+ *
3826
+ */
3827
+ x: number;
3828
+ /**
3829
+ *
3830
+ */
3831
+ y: number;
3832
+ constructor(x: number, y: number);
3833
+ equals(obj: ScrollPosition | null): boolean;
3834
+ }
3835
+ /**
3836
+ *
3837
+ * A point relative to the viewport in viewport coordinates (integer), the origin is at the top-left of the viewport, x increasing to the right and y increasing downwards
3838
+ */
3839
+ class Point extends Internal.NativeBase {
3840
+ /**
3841
+ *
3842
+ */
3843
+ x: number;
3844
+ /**
3845
+ *
3846
+ */
3847
+ y: number;
3848
+ constructor(x: number, y: number);
3849
+ equals(obj: Point | null): boolean;
3850
+ }
3851
+ /**
3852
+ *
3853
+ * A Rectangle relative to the viewport in viewport coordinates (integer), the origin is at the top-left of the viewport, x increasing to the right and y increasing downwards
3854
+ */
3855
+ class Rectangle extends Internal.NativeBase {
3856
+ /**
3857
+ *
3858
+ */
3859
+ x: number;
3860
+ /**
3861
+ *
3862
+ */
3863
+ y: number;
3864
+ /**
3865
+ *
3866
+ */
3867
+ width: number;
3868
+ /**
3869
+ *
3870
+ */
3871
+ height: number;
3872
+ constructor(x: number, y: number, width: number, height: number);
3873
+ equals(obj: Rectangle | null): boolean;
3874
+ }
3875
+ /**
3876
+ *
3877
+ * A set of paddings to be added at the respective sides of a rectangular object.
3878
+ */
3879
+ class Padding extends Internal.NativeBase {
3880
+ /**
3881
+ *
3882
+ */
3883
+ left: number;
3884
+ /**
3885
+ *
3886
+ */
3887
+ right: number;
3888
+ /**
3889
+ *
3890
+ */
3891
+ top: number;
3892
+ /**
3893
+ *
3894
+ */
3895
+ bottom: number;
3896
+ constructor(left: number, right: number, top: number, bottom: number);
3897
+ equals(obj: Padding | null): boolean;
3898
+ }
3899
+ }
3900
+ }
3901
+ namespace Content {
3902
+ /**
3903
+ *
3904
+ */
3905
+ enum Byteorder {
3906
+ /**
3907
+ *
3908
+ */
3909
+ Invalid = 0
3910
+ }
3911
+ /**
3912
+ *
3913
+ * A List of {@link PdfViewing.Pdf.Content.TextFragment }s
3914
+ */
3915
+ class TextFragmentList extends Internal.NativeObject implements List<PdfViewing.Pdf.Content.TextFragment> {
3916
+ /**
3917
+ * Close the object
3918
+ *
3919
+ * Release all native resources associated with the object.
3920
+ */
3921
+ close(): void;
3922
+ remove(element: PdfViewing.Pdf.Content.TextFragment): boolean;
3923
+ add(element: PdfViewing.Pdf.Content.TextFragment): boolean;
3924
+ addRange(inputList: TextFragmentList): boolean;
3925
+ set(index: number, element: PdfViewing.Pdf.Content.TextFragment): void;
3926
+ clear(): void;
3927
+ get(index: number): PdfViewing.Pdf.Content.TextFragment;
3928
+ getRange(index: number, count: number): TextFragmentList;
3929
+ get size(): number;
3930
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Content.TextFragment>;
3931
+ }
3932
+ interface ViewingPdfContentTextSearchIteratorEventMap {
3933
+ /**
3934
+ *
3935
+ * {@link PdfViewing.Pdf.Content.TextSearchIterator.match } has been updated with a new result.
3936
+ *
3937
+ * The found Match.
3938
+ */
3939
+ matchChanged: PdfViewing.Pdf.Content.TextSelection;
3940
+ /**
3941
+ *
3942
+ * {@link PdfViewing.Pdf.Content.TextSearchIterator.totalMatches } has been updated with a new result.
3943
+ */
3944
+ totalMatchesChanged: void;
3945
+ }
3946
+ type ViewingPdfContentTextSearchIteratorEventListener = <K extends keyof ViewingPdfContentTextSearchIteratorEventMap>(e: ViewingPdfContentTextSearchIteratorEventMap[K]) => void;
3947
+ type ViewingPdfContentTextSearchIteratorEventTypes = keyof ViewingPdfContentTextSearchIteratorEventMap;
3948
+ /**
3949
+ *
3950
+ * Calling `SearchText` returns a `TextSearchIterator` starting the search at the beginning of the specified page.
3951
+ * `GetNext` and `GetPrevious` starts the search in the respective direction and subsequent calls iterate further starting from the result of the previous call.
3952
+ * `null` is returned if no more results are found.
3953
+ */
3954
+ class TextSearchIterator extends Internal.NativeObject {
3955
+ private eventListeners;
3956
+ /**
3957
+ * @event
3958
+ */
3959
+ addEventListener<K extends keyof ViewingPdfContentTextSearchIteratorEventMap>(type: K, listener: (e: ViewingPdfContentTextSearchIteratorEventMap[K]) => void): void;
3960
+ removeEventListener<K extends keyof ViewingPdfContentTextSearchIteratorEventMap>(type: K, listener: (e: ViewingPdfContentTextSearchIteratorEventMap[K]) => void): void;
3961
+ /**
3962
+ * Close the object
3963
+ *
3964
+ * Release all native resources associated with the object.
3965
+ */
3966
+ close(): void;
3967
+ /**
3968
+ *
3969
+ * Update {@link PdfViewing.Pdf.Content.TextSearchIterator.match } to the next match in the document.
3970
+ * If no further rersult can be found `false` is returned and {@link PdfViewing.Pdf.Content.TextSearchIterator.match } is not updated.
3971
+ * @returns
3972
+ *
3973
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3974
+ */
3975
+ getNext(): Promise<boolean>;
3976
+ private getNextCallback;
3977
+ /**
3978
+ *
3979
+ * Update {@link PdfViewing.Pdf.Content.TextSearchIterator.match } to the next match in the document in backwards direction.
3980
+ * If no further rersult can be found `false` is returned and {@link PdfViewing.Pdf.Content.TextSearchIterator.match } is not updated.
3981
+ * @returns
3982
+ *
3983
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3984
+ */
3985
+ getPrevious(): Promise<boolean>;
3986
+ private getPreviousCallback;
3987
+ /**
3988
+ *
3989
+ * Start searching the entire document asynchronously.
3990
+ * The property {@link PdfViewing.Pdf.Content.TextSearchIterator.totalMatches } will be updated continuously until the entire document has been searched.
3991
+ * This is aborted if this {@link PdfViewing.Pdf.Content.TextSearchIterator } is closed.
3992
+ * @returns newly created promise for further asynchronous processing.
3993
+ *
3994
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
3995
+ */
3996
+ loadAllMatches(): Promise<void>;
3997
+ private loadAllMatchesCallback;
3998
+ /**
3999
+ * The last text that was found with this search.
4000
+ * Initial value is `null`, call {@link PdfViewing.Pdf.Content.TextSearchIterator.getNext } or {@link PdfViewing.Pdf.Content.TextSearchIterator.getPrevious }
4001
+ * to get the next matching textselection in the respective direction.
4002
+ * Property remains unchanged if call to {@link PdfViewing.Pdf.Content.TextSearchIterator.getNext } or {@link PdfViewing.Pdf.Content.TextSearchIterator.getPrevious } returns `false`.
4003
+ * Matches can occur on different kind of content, being represented as different subtypes of {@link PdfViewing.Pdf.Content.Selection }.
4004
+ * To get positional information aboutselected text cast to the respective type. e.g. {@link PdfViewing.Pdf.Content.TextSelection } for any results in flowing text.
4005
+ */
4006
+ get match(): PdfViewing.Pdf.Content.Selection;
4007
+ /**
4008
+ * Index of the current match since start of textsearchIterator.
4009
+ * First Match has index 1.
4010
+ */
4011
+ get matchIndex(): number;
4012
+ /**
4013
+ * Total known matches in document.
4014
+ * This number might not be correct if not all text is loaded.
4015
+ */
4016
+ get totalMatches(): number;
4017
+ /**
4018
+ * Whether when reaching beginning or end of document (depending on search direction)
4019
+ * search should be continued at other end.
4020
+ *
4021
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4022
+ */
4023
+ get wrapping(): boolean;
4024
+ /**
4025
+ * Whether when reaching beginning or end of document (depending on search direction)
4026
+ * search should be continued at other end.
4027
+ *
4028
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4029
+ */
4030
+ set wrapping(wrapping: boolean);
4031
+ }
4032
+ /**
4033
+ *
4034
+ * A rendered image of a page.
4035
+ * With high zoom only part of a page is rendered.
4036
+ */
4037
+ class Image extends Internal.NativeObject {
4038
+ /**
4039
+ * Close the object
4040
+ *
4041
+ * Release all native resources associated with the object.
4042
+ */
4043
+ close(): void;
4044
+ /**
4045
+ *
4046
+ * Removes image data from this image in order to reduce memory usage.
4047
+ * This operation invalidates {@link PdfViewing.Pdf.Content.Image.samples } and {@link PdfViewing.Pdf.Content.Image.bufferView }.
4048
+ * This functionality should only be used when image data has already been prepared in event `ImageCreated`.
4049
+ *
4050
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4051
+ */
4052
+ removeImageData(): void;
4053
+ /**
4054
+ * Indicates whether Image data has been removed using {@link PdfViewing.Pdf.Content.Image.removeImageData }.
4055
+ *
4056
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4057
+ */
4058
+ get hasImageData(): boolean;
4059
+ /**
4060
+ * A unique identifier for this image.
4061
+ * Note that the method {@link PdfViewing.Pdf.View.getRenderedResults }
4062
+ * returns the same image with the same ID multiple times to conserve memory.
4063
+ * Whenever an image is added to the internal cache {@link PdfViewing.Pdf.ViewingPdfViewEventMap.imageCreated } is triggered
4064
+ * and when removed from the cache the same ID is returned in event {@link PdfViewing.Pdf.ViewingPdfViewEventMap.imageRemovedFromCache }.
4065
+ * An identifier is only unique in the context of the associated {@link PdfViewing.ViewerController }.
4066
+ *
4067
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4068
+ */
4069
+ get id(): number;
4070
+ /**
4071
+ * Width of the image in pixels
4072
+ *
4073
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4074
+ */
4075
+ get width(): number;
4076
+ /**
4077
+ * Height of the image in pixels
4078
+ *
4079
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4080
+ */
4081
+ get height(): number;
4082
+ /**
4083
+ * Number of bytes used per pixel of the image
4084
+ *
4085
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4086
+ */
4087
+ get bytePerPixel(): number;
4088
+ /**
4089
+ * Raw byte array of the image.
4090
+ * This operation returns a copy of the internal buffer.
4091
+ * If image data has been removed using {@link PdfViewing.Pdf.Content.Image.removeImageData } this array will be empty.
4092
+ *
4093
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4094
+ */
4095
+ get samples(): Uint8Array;
4096
+ /**
4097
+ * A buffer view of the raw byte array of the image.
4098
+ * This operation returns a direct view on the internal buffer.
4099
+ * If image data has been removed using {@link PdfViewing.Pdf.Content.Image.removeImageData } this array will be empty.
4100
+ *
4101
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4102
+ */
4103
+ get bufferView(): Uint8Array | null;
4104
+ }
4105
+ /**
4106
+ *
4107
+ * An image that has a specific position on the viewport.
4108
+ */
4109
+ class PlacedImage extends PdfViewing.Pdf.Content.Image {
4110
+ /**
4111
+ * Rectangle in relation to the page where the image should be rendered to.
4112
+ * Note, that the image might be in different resolution to the size of this rectangle.
4113
+ *
4114
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4115
+ */
4116
+ get imageRectangle(): PdfViewing.Pdf.Geometry.Integer.Rectangle;
4117
+ }
4118
+ /**
4119
+ *
4120
+ * A text fragment describes part of the text on a page.
4121
+ * Usually one text fragment is one line of text, but this may vary.
4122
+ */
4123
+ class TextFragment extends Internal.NativeObject {
4124
+ /**
4125
+ * Close the object
4126
+ *
4127
+ * Release all native resources associated with the object.
4128
+ */
4129
+ close(): void;
4130
+ /**
4131
+ * A rectangle where on the page the text is
4132
+ *
4133
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4134
+ */
4135
+ get rectangleOnPage(): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
4136
+ /**
4137
+ * A more accurate description where the text is on the page
4138
+ *
4139
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4140
+ */
4141
+ get textArea(): PdfViewing.Pdf.Geometry.Real.QuadrilateralOnPage;
4142
+ /**
4143
+ * The content of the text
4144
+ *
4145
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4146
+ */
4147
+ get text(): string;
4148
+ /**
4149
+ * A list of offsets of the separate glyphs of the text.
4150
+ *
4151
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4152
+ */
4153
+ get glyphOffsets(): number[];
4154
+ }
4155
+ /**
4156
+ *
4157
+ * A selection of text.
4158
+ */
4159
+ class Selection extends Internal.NativeObject {
4160
+ /**
4161
+ * Close the object
4162
+ *
4163
+ * Release all native resources associated with the object.
4164
+ */
4165
+ close(): void;
4166
+ /**
4167
+ * Actual content of text
4168
+ *
4169
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4170
+ */
4171
+ get text(): string | null;
4172
+ }
4173
+ /**
4174
+ *
4175
+ * A selection of text in the pdf with an associated area on a page.
4176
+ */
4177
+ class TextSelection extends PdfViewing.Pdf.Content.Selection {
4178
+ /**
4179
+ * Area of all selected text. Used for highlighting.
4180
+ *
4181
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4182
+ */
4183
+ get textArea(): PdfViewing.Pdf.Geometry.Real.QuadrilateralList;
4184
+ }
4185
+ /**
4186
+ *
4187
+ * Buffer of binary data
4188
+ */
4189
+ class BinaryBuffer extends Internal.NativeObject {
4190
+ /**
4191
+ * Close the object
4192
+ *
4193
+ * Release all native resources associated with the object.
4194
+ */
4195
+ close(): void;
4196
+ /**
4197
+ * Copy of raw buffer
4198
+ *
4199
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4200
+ */
4201
+ get bufferData(): Uint8Array;
4202
+ /**
4203
+ * View on raw buffer
4204
+ *
4205
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4206
+ */
4207
+ get bufferView(): Uint8Array | null;
4208
+ }
4209
+ /**
4210
+ *
4211
+ * All information concerning a rendered page
4212
+ */
4213
+ class RenderedPage extends Internal.NativeObject {
4214
+ /**
4215
+ * Close the object
4216
+ *
4217
+ * Release all native resources associated with the object.
4218
+ */
4219
+ close(): void;
4220
+ /**
4221
+ * Describes where a page is located on the viewport.
4222
+ * Conventionally a viewer should render this area as a white rectangle.
4223
+ *
4224
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4225
+ */
4226
+ get pageRect(): PdfViewing.Pdf.Geometry.Integer.Rectangle;
4227
+ /**
4228
+ * Describes a rendered image of this page.
4229
+ * Depending on the zoom level and resolution this image may not contain the entire page.
4230
+ * The image's location and size are relative to the top-left corner of {@link PdfViewing.Pdf.Content.RenderedPage.pageRect }
4231
+ * Returns `null` if the page has not yet been rendered.
4232
+ *
4233
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4234
+ */
4235
+ get image(): PdfViewing.Pdf.Content.PlacedImage | null;
4236
+ /**
4237
+ * The pagenumber within the document of this page.
4238
+ *
4239
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4240
+ */
4241
+ get pageNumber(): number;
4242
+ }
4243
+ /**
4244
+ *
4245
+ * A List of {@link PdfViewing.Pdf.Content.RenderedPage }s
4246
+ */
4247
+ class RenderedPageList extends Internal.NativeObject implements List<PdfViewing.Pdf.Content.RenderedPage> {
4248
+ /**
4249
+ * Close the object
4250
+ *
4251
+ * Release all native resources associated with the object.
4252
+ */
4253
+ close(): void;
4254
+ remove(element: PdfViewing.Pdf.Content.RenderedPage): boolean;
4255
+ add(element: PdfViewing.Pdf.Content.RenderedPage): boolean;
4256
+ addRange(inputList: RenderedPageList): boolean;
4257
+ set(index: number, element: PdfViewing.Pdf.Content.RenderedPage): void;
4258
+ clear(): void;
4259
+ get(index: number): PdfViewing.Pdf.Content.RenderedPage;
4260
+ getRange(index: number, count: number): RenderedPageList;
4261
+ get size(): number;
4262
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Content.RenderedPage>;
4263
+ }
4264
+ /**
4265
+ *
4266
+ * Rendered results concerning the current view.
4267
+ */
4268
+ class RenderResults extends Internal.NativeObject {
4269
+ /**
4270
+ * Close the object
4271
+ *
4272
+ * Release all native resources associated with the object.
4273
+ */
4274
+ close(): void;
4275
+ /**
4276
+ * A list of all pages currently visible on the viewport.
4277
+ *
4278
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4279
+ */
4280
+ get visiblePages(): PdfViewing.Pdf.Content.RenderedPageList;
4281
+ }
4282
+ }
4283
+ namespace Navigation {
4284
+ /**
4285
+ *
4286
+ * Setting how the viewport will be fitted to the visible content
4287
+ */
4288
+ enum FitMode {
4289
+ /**
4290
+ *
4291
+ * Do not fit
4292
+ */
4293
+ None = 0,
4294
+ /**
4295
+ *
4296
+ * Fit viewport to width of widest visible page
4297
+ */
4298
+ FitWidth = 1,
4299
+ /**
4300
+ *
4301
+ * Fit viewport to be able to show largest visible page in its entirety
4302
+ */
4303
+ FitPage = 2
4304
+ }
4305
+ /**
4306
+ *
4307
+ * Setting how the pages will be arranged on the viewport
4308
+ */
4309
+ enum PageLayoutMode {
4310
+ /**
4311
+ *
4312
+ * Display a single page at a time.
4313
+ */
4314
+ SinglePage = 0,
4315
+ /**
4316
+ *
4317
+ * Display a Column of pages.
4318
+ */
4319
+ OneColumn = 1,
4320
+ /**
4321
+ *
4322
+ * Display two columns of pages next to each other. The first page will be on the left.
4323
+ */
4324
+ TwoColumnLeft = 2,
4325
+ /**
4326
+ *
4327
+ * Display two columns of pages next to each other. The first page will be on the right.
4328
+ */
4329
+ TwoColumnRight = 3,
4330
+ /**
4331
+ *
4332
+ * Display two pages next to each other. The first page will be on the left
4333
+ */
4334
+ TwoPageLeft = 4,
4335
+ /**
4336
+ *
4337
+ * Display two pages next to each other. The first page will be on the right
4338
+ */
4339
+ TwoPageRight = 5
4340
+ }
4341
+ /**
4342
+ *
4343
+ * A List of {@link PdfViewing.Pdf.Navigation.OutlineItem }s
4344
+ */
4345
+ class OutlineItemList extends Internal.NativeObject implements List<PdfViewing.Pdf.Navigation.OutlineItem> {
4346
+ /**
4347
+ * Close the object
4348
+ *
4349
+ * Release all native resources associated with the object.
4350
+ */
4351
+ close(): void;
4352
+ remove(element: PdfViewing.Pdf.Navigation.OutlineItem): boolean;
4353
+ add(element: PdfViewing.Pdf.Navigation.OutlineItem): boolean;
4354
+ addRange(inputList: OutlineItemList): boolean;
4355
+ set(index: number, element: PdfViewing.Pdf.Navigation.OutlineItem): void;
4356
+ clear(): void;
4357
+ get(index: number): PdfViewing.Pdf.Navigation.OutlineItem;
4358
+ getRange(index: number, count: number): OutlineItemList;
4359
+ get size(): number;
4360
+ [Symbol.iterator](): Iterator<PdfViewing.Pdf.Navigation.OutlineItem>;
4361
+ }
4362
+ /**
4363
+ *
4364
+ * A destination is a location in the document that
4365
+ * can be used as a jump target,
4366
+ * e.g. for outline items (bookmarks) or link annotations.
4367
+ */
4368
+ class Destination extends Internal.NativeObject {
4369
+ /**
4370
+ * Close the object
4371
+ *
4372
+ * Release all native resources associated with the object.
4373
+ */
4374
+ close(): void;
4375
+ /**
4376
+ * The target destination (Getter)
4377
+ *
4378
+ * For direct destinations,
4379
+ * this is just the destination itself.
4380
+ *
4381
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4382
+ */
4383
+ get target(): PdfViewing.Pdf.Navigation.DirectDestination;
4384
+ }
4385
+ /**
4386
+ *
4387
+ * A named destination that can be referred by name.
4388
+ * Named destinations have two advantages compared to direct destinations:
4389
+ * - The name can be used in web links,
4390
+ * e.g. http://www.example.com/document.pdf#destinationname
4391
+ * - If the target destination of a named destination is changed,
4392
+ * all occurrences automatically point ot the new target.
4393
+ */
4394
+ class NamedDestination extends PdfViewing.Pdf.Navigation.Destination {
4395
+ /**
4396
+ * The name by which the destination is referred to.
4397
+ *
4398
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4399
+ */
4400
+ get name(): string;
4401
+ }
4402
+ /**
4403
+ *
4404
+ *
4405
+ * A destination that directly points to a specific location in the document.
4406
+ *
4407
+ * Note: Many PDF viewers support different viewing modes like "fit page" or
4408
+ * "fit width".
4409
+ * Most destination types will change the current viewing mode in those viewers.
4410
+ *
4411
+ * Changing the viewing mode is usually not very well received by users
4412
+ * and thus a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } should be preferred in most cases.
4413
+ */
4414
+ class DirectDestination extends PdfViewing.Pdf.Navigation.Destination {
4415
+ /**
4416
+ * The page in the document that this destination is pointing to.
4417
+ *
4418
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4419
+ */
4420
+ get pageNumber(): number;
4421
+ }
4422
+ /**
4423
+ *
4424
+ * A destination that points to a specific location on the target page,
4425
+ * using a specified zoom factor.
4426
+ * The location is displayed in the top left corner of the viewport (if possible).
4427
+ */
4428
+ class LocationZoomDestination extends PdfViewing.Pdf.Navigation.DirectDestination {
4429
+ /**
4430
+ *
4431
+ * Create a new {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } object.
4432
+ * @param pageNumber
4433
+ * The page in the document that this destination is pointing to.
4434
+ * @param left
4435
+ *
4436
+ * The location of the page that is displayed at the left border
4437
+ * of the viewport or `null`.
4438
+ *
4439
+ * See property {@link PdfViewing.Pdf.Navigation.LocationZoomDestination.left } for more information.
4440
+ * @param top
4441
+ *
4442
+ * The location of the page that is displayed at the top
4443
+ * of the viewport or `null`.
4444
+ *
4445
+ * See property {@link PdfViewing.Pdf.Navigation.LocationZoomDestination.top } for more information.
4446
+ * @param zoom
4447
+ *
4448
+ * The zoom factor that is applied when jumping to the destination
4449
+ * or `null`.
4450
+ *
4451
+ * See property {@link PdfViewing.Pdf.Navigation.LocationZoomDestination.zoom } for more information.
4452
+ */
4453
+ constructor(pageNumber: number, left: number | null, top: number | null, zoom: number | null);
4454
+ /**
4455
+ *
4456
+ * The location of the page that is displayed at the left border of the viewport (if possible).
4457
+ *
4458
+ * If the property is `null`, the value from before the jump is retained.
4459
+ *
4460
+ * Note: Due to the current zoom factor,
4461
+ * it is usually not possible for viewers to scroll as far to the right side,
4462
+ * as would be necessary to place the location at the left corner of the viewport.
4463
+ * However, viewers will ensure, that the location is at least visible.
4464
+ *
4465
+ * In practice this means, that this value is mostly irrelevant.
4466
+ *
4467
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4468
+ */
4469
+ get left(): number | null;
4470
+ /**
4471
+ *
4472
+ * The location of the page that is displayed at the top of the viewport (if possible).
4473
+ *
4474
+ * If the property is `null`, the value from before the jump is retained.
4475
+ *
4476
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4477
+ */
4478
+ get top(): number | null;
4479
+ /**
4480
+ *
4481
+ * The zoom factor that is applied when jumping to the destination.
4482
+ *
4483
+ * A value of `null` means that the current zoom level is retained.
4484
+ *
4485
+ * Note: Many PDF viewers support different viewing modes like "fit page" or "fit width".
4486
+ *
4487
+ * A {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } with a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination.zoom } value of `null`
4488
+ * will usually not change the current viewing mode in most viewers.
4489
+ *
4490
+ * For other {@link PdfViewing.Pdf.Navigation.LocationZoomDestination.zoom } values however,
4491
+ * the viewer must switch to the standard mode,
4492
+ * i.e. deactivate special modes like "fit page" or "fit width".
4493
+ *
4494
+ * Because of this,
4495
+ * using a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination.zoom } value other than `null` is discouraged.
4496
+ *
4497
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4498
+ */
4499
+ get zoom(): number | null;
4500
+ }
4501
+ /**
4502
+ *
4503
+ *
4504
+ * A destination fits an entire page into the viewport.
4505
+ *
4506
+ * Note: Many PDF viewers support different viewing modes like "fit page" or
4507
+ * "fit width".
4508
+ * A {@link PdfViewing.Pdf.Navigation.FitPageDestination } will change the current viewing mode to
4509
+ * "fit page" in those viewers.
4510
+ *
4511
+ * Changing the viewing mode is usually not very well received by users
4512
+ * and thus a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } should be preferred in most cases.
4513
+ */
4514
+ class FitPageDestination extends PdfViewing.Pdf.Navigation.DirectDestination {
4515
+ /**
4516
+ *
4517
+ * @param pageNumber
4518
+ * The page in the document that this destination is pointing to.
4519
+ * @param fitActualContent
4520
+ *
4521
+ * If `true`, the viewport is fitted to the actual content of the page,
4522
+ * instead of the size of the page.
4523
+ *
4524
+ * See property {@link PdfViewing.Pdf.Navigation.FitPageDestination.fitActualContent } for more information.
4525
+ */
4526
+ constructor(pageNumber: number, fitActualContent: boolean);
4527
+ /**
4528
+ *
4529
+ * If `true`, the viewport is fitted to the actual content of the page,
4530
+ * instead of the size of the page.
4531
+ *
4532
+ * Note: Many PDF viewers simply ignore this property and always treat it
4533
+ * as `false`, i.e. switching to "fit page" mode anyway.
4534
+ *
4535
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4536
+ */
4537
+ get fitActualContent(): boolean;
4538
+ }
4539
+ /**
4540
+ *
4541
+ *
4542
+ * A destination fits the width of a page into the viewport.
4543
+ *
4544
+ * Note: Many PDF viewers support different viewing modes like "fit page" or
4545
+ * "fit width".
4546
+ * A {@link PdfViewing.Pdf.Navigation.FitWidthDestination } will change the current viewing mode to
4547
+ * "fit width" in those viewers.
4548
+ *
4549
+ * Changing the viewing mode is usually not very well received by users
4550
+ * and thus a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } should be preferred in most cases.
4551
+ */
4552
+ class FitWidthDestination extends PdfViewing.Pdf.Navigation.DirectDestination {
4553
+ /**
4554
+ *
4555
+ * @param pageNumber
4556
+ * The page in the document that this destination is pointing to.
4557
+ * @param top
4558
+ *
4559
+ * The location of the page that is displayed at the top of the viewport (if possible).
4560
+ *
4561
+ * Set `null` to use top edge of the page.
4562
+ * @param fitActualContent
4563
+ *
4564
+ * If `true`, the viewport is fitted to the actual content of the page,
4565
+ * instead of the size of the page.
4566
+ *
4567
+ * See property {@link PdfViewing.Pdf.Navigation.FitWidthDestination.fitActualContent } for more information.
4568
+ */
4569
+ constructor(pageNumber: number, top: number | null, fitActualContent: boolean);
4570
+ /**
4571
+ *
4572
+ * If `true`, the viewport is fitted to the width of the actual content of the page,
4573
+ * instead of the width of the page.
4574
+ *
4575
+ * Note: Many PDF viewers simply ignore this property and always treat it
4576
+ * as `false`, i.e. switching to "fit page" mode anyway.
4577
+ *
4578
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4579
+ */
4580
+ get fitActualContent(): boolean;
4581
+ /**
4582
+ *
4583
+ * The location of the page that is displayed at the top of the viewport (if possible).
4584
+ *
4585
+ * If the property is `null`, then the top of the page will be used.
4586
+ *
4587
+ * This value is ignored by viewers if the view is rotated.
4588
+ *
4589
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4590
+ */
4591
+ get top(): number | null;
4592
+ }
4593
+ /**
4594
+ *
4595
+ *
4596
+ * A destination fits the height of a page into the viewport.
4597
+ *
4598
+ * Note: Many PDF viewers support different viewing modes like "fit page" or
4599
+ * "fit width".
4600
+ * A {@link PdfViewing.Pdf.Navigation.FitHeightDestination } will change the current viewing mode to
4601
+ * "fit height" in those viewers.
4602
+ *
4603
+ * Changing the viewing mode is usually not very well received by users
4604
+ * and thus a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } should be preferred in most cases.
4605
+ */
4606
+ class FitHeightDestination extends PdfViewing.Pdf.Navigation.DirectDestination {
4607
+ /**
4608
+ *
4609
+ * @param pageNumber
4610
+ * The page in the document that this destination is pointing to.
4611
+ * @param left
4612
+ *
4613
+ * The location of the page that is displayed at the left edge of the viewport (if possible).
4614
+ *
4615
+ * Set `null` to use left edge of the page.
4616
+ * @param fitActualContent
4617
+ *
4618
+ * If `true`, the viewport is fitted to the actual content of the page,
4619
+ * instead of the size of the page.
4620
+ *
4621
+ * See property {@link PdfViewing.Pdf.Navigation.FitHeightDestination.fitActualContent } for more information.
4622
+ */
4623
+ constructor(pageNumber: number, left: number | null, fitActualContent: boolean);
4624
+ /**
4625
+ *
4626
+ * If `true`, the viewport is fitted to the width of the actual content of the page,
4627
+ * instead of the width of the page.
4628
+ *
4629
+ * Note: Many PDF viewers simply ignore this property and always treat it
4630
+ * as `false`, i.e. switching to "fit page" mode anyway.
4631
+ *
4632
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4633
+ */
4634
+ get fitActualContent(): boolean;
4635
+ /**
4636
+ *
4637
+ * The location of the page that is displayed as the left edge of the viewport (if possible).
4638
+ *
4639
+ * If the property is `null`, then the left edge of the page will be used.
4640
+ *
4641
+ * This value is ignored by viewers if the view is rotated.
4642
+ *
4643
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4644
+ */
4645
+ get left(): number | null;
4646
+ }
4647
+ /**
4648
+ *
4649
+ *
4650
+ * A destination that fits a specified area of a page into the viewport.
4651
+ *
4652
+ * Note: Many PDF viewers support different viewing modes like "fit page" or
4653
+ * "fit width".
4654
+ * A {@link PdfViewing.Pdf.Navigation.FitRectangleDestination } will change the current viewing mode to
4655
+ * standard mode in those viewers,
4656
+ * i.e. deactivate any special mode like "fit page" or "fit width".
4657
+ *
4658
+ * Changing the viewing mode is usually not very well received by users
4659
+ * and thus a {@link PdfViewing.Pdf.Navigation.LocationZoomDestination } should be preferred in most cases.
4660
+ */
4661
+ class FitRectangleDestination extends PdfViewing.Pdf.Navigation.DirectDestination {
4662
+ /**
4663
+ *
4664
+ * @param rectangleOnPage
4665
+ * The rectangle that is displayed in the viewport.
4666
+ */
4667
+ constructor(rectangleOnPage: PdfViewing.Pdf.Geometry.Real.RectangleOnPage);
4668
+ /**
4669
+ * The rectangle that is displayed in the viewport.
4670
+ *
4671
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4672
+ */
4673
+ get rectangle(): PdfViewing.Pdf.Geometry.Real.RectangleOnPage;
4674
+ }
4675
+ /**
4676
+ *
4677
+ * An outline item represents an entry in the outline tree of the document.
4678
+ * It is also known as "Bookmark".
4679
+ */
4680
+ class OutlineItem extends Internal.NativeObject {
4681
+ /**
4682
+ * Close the object
4683
+ *
4684
+ * Release all native resources associated with the object.
4685
+ */
4686
+ close(): void;
4687
+ /**
4688
+ * The title of the outline item.
4689
+ *
4690
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4691
+ */
4692
+ get title(): string;
4693
+ /**
4694
+ * If `true`, the outline item is displayed in bold font.
4695
+ *
4696
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4697
+ */
4698
+ get bold(): boolean;
4699
+ /**
4700
+ * If `true`, the outline item is displayed in italic font.
4701
+ *
4702
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4703
+ */
4704
+ get italic(): boolean;
4705
+ /**
4706
+ * The destination of the outline item.
4707
+ *
4708
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4709
+ */
4710
+ get destination(): PdfViewing.Pdf.Navigation.Destination | null;
4711
+ /**
4712
+ * - If `true`, the item is expanded.
4713
+ * - If `false`, the item is collapsed.
4714
+ * This is property is only meaningful if the item has child items.
4715
+ *
4716
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4717
+ */
4718
+ get isOpen(): boolean;
4719
+ /**
4720
+ * If `true`, this outline item has further children outline items.
4721
+ *
4722
+ * @throws {@link PdfViewing.InvalidOperationError} if the object has already been closed
4723
+ */
4724
+ get hasChildren(): boolean;
4725
+ }
4726
+ }
4727
+ }
4728
+ /**
4729
+ * A generic error occurred.
4730
+ *
4731
+ */
4732
+ export class GenericError extends PdfViewingError {
4733
+ constructor(message?: string);
4734
+ }
4735
+ /**
4736
+ * A fatal error occurred.
4737
+ *
4738
+ */
4739
+ export class FatalError extends PdfViewingError {
4740
+ constructor(message?: string);
4741
+ }
4742
+ /**
4743
+ * The license is not valid.
4744
+ *
4745
+ */
4746
+ export class LicenseError extends PdfViewingError {
4747
+ constructor(message?: string);
4748
+ }
4749
+ /**
4750
+ * The format is not known.
4751
+ *
4752
+ */
4753
+ export class UnknownFormatError extends PdfViewingError {
4754
+ constructor(message?: string);
4755
+ }
4756
+ /**
4757
+ * The file is corrupt and cannot be opened.
4758
+ *
4759
+ */
4760
+ export class CorruptError extends PdfViewingError {
4761
+ constructor(message?: string);
4762
+ }
4763
+ /**
4764
+ * Invalid password specified.
4765
+ *
4766
+ */
4767
+ export class PasswordError extends PdfViewingError {
4768
+ constructor(message?: string);
4769
+ }
4770
+ /**
4771
+ * The document has an invalid conformance level.
4772
+ *
4773
+ */
4774
+ export class ConformanceError extends PdfViewingError {
4775
+ constructor(message?: string);
4776
+ }
4777
+ /**
4778
+ * The document contains an unsupported feature.
4779
+ *
4780
+ */
4781
+ export class UnsupportedFeatureError extends PdfViewingError {
4782
+ constructor(message?: string);
4783
+ }
4784
+ /**
4785
+ * Infrastructure error occurred.
4786
+ *
4787
+ */
4788
+ export class InfrastructureError extends PdfViewingError {
4789
+ constructor(message?: string);
4790
+ }
4791
+ /**
4792
+ * The file cannot be processed.
4793
+ *
4794
+ */
4795
+ export class ProcessingError extends PdfViewingError {
4796
+ constructor(message?: string);
4797
+ }
4798
+ /**
4799
+ * The specified item already exists.
4800
+ *
4801
+ */
4802
+ export class ExistsError extends PdfViewingError {
4803
+ constructor(message?: string);
4804
+ }
4805
+ /**
4806
+ * The update failed.
4807
+ *
4808
+ */
4809
+ export class UpdateFailedError extends PdfViewingError {
4810
+ constructor(message?: string);
4811
+ }
4812
+ /**
4813
+ *
4814
+ */
4815
+ export class NotSupportedError extends PdfViewingError {
4816
+ constructor(message?: string);
4817
+ }
4818
+ /**
4819
+ *
4820
+ */
4821
+ export class InvalidOperationError extends PdfViewingError {
4822
+ constructor(message?: string);
4823
+ }
4824
+ /**
4825
+ *
4826
+ */
4827
+ export class ArgumentError extends PdfViewingError {
4828
+ constructor(message?: string);
4829
+ }
4830
+ /**
4831
+ *
4832
+ */
4833
+ export class NotFoundError extends PdfViewingError {
4834
+ constructor(message?: string);
4835
+ }
4836
+ /**
4837
+ *
4838
+ */
4839
+ export class IOError extends PdfViewingError {
4840
+ constructor(message?: string);
4841
+ }
4842
+ export namespace Sys {
4843
+ class StreamObject {
4844
+ /**
4845
+ * @returns Underlying Uint8Array.
4846
+ */
4847
+ get parameter(): any;
4848
+ /**
4849
+ * @param value Allowed types are Uint8Array and Blob.
4850
+ */
4851
+ set parameter(value: any);
4852
+ }
4853
+ }
4854
+ interface List<T> extends Iterable<T> {
4855
+ remove(element: T): boolean;
4856
+ add(element: T): boolean;
4857
+ addRange(inputList: List<T>): boolean;
4858
+ set(index: number, element: T): void;
4859
+ clear(): void;
4860
+ get(index: number): T;
4861
+ getRange(startIndex: number, endIndex: number): List<T>;
4862
+ readonly size: number;
4863
+ }
4864
+ export {};
4865
+ }