@box/pdfjs-dist 0.0.0-stage → 6.4.299-box.2
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.
- package/CHANGELOG.md +16 -0
- package/CODE_OF_CONDUCT.md +15 -0
- package/LICENSE +177 -0
- package/README.md +23 -2
- package/build/pdf.min.mjs +28 -0
- package/build/pdf.mjs +28336 -0
- package/build/pdf.mjs.map +1 -0
- package/build/pdf.sandbox.min.mjs +28 -0
- package/build/pdf.sandbox.mjs +211 -0
- package/build/pdf.sandbox.mjs.map +1 -0
- package/build/pdf.worker.min.mjs +28 -0
- package/build/pdf.worker.mjs +64908 -0
- package/build/pdf.worker.mjs.map +1 -0
- package/cmaps/78-EUC-H.bcmap +0 -0
- package/cmaps/78-EUC-V.bcmap +0 -0
- package/cmaps/78-H.bcmap +0 -0
- package/cmaps/78-RKSJ-H.bcmap +0 -0
- package/cmaps/78-RKSJ-V.bcmap +0 -0
- package/cmaps/78-V.bcmap +0 -0
- package/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/cmaps/Add-H.bcmap +0 -0
- package/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/cmaps/Add-V.bcmap +0 -0
- package/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/cmaps/B5-H.bcmap +0 -0
- package/cmaps/B5-V.bcmap +0 -0
- package/cmaps/B5pc-H.bcmap +0 -0
- package/cmaps/B5pc-V.bcmap +0 -0
- package/cmaps/CNS-EUC-H.bcmap +0 -0
- package/cmaps/CNS-EUC-V.bcmap +0 -0
- package/cmaps/CNS1-H.bcmap +0 -0
- package/cmaps/CNS1-V.bcmap +0 -0
- package/cmaps/CNS2-H.bcmap +0 -0
- package/cmaps/CNS2-V.bcmap +3 -0
- package/cmaps/ETHK-B5-H.bcmap +0 -0
- package/cmaps/ETHK-B5-V.bcmap +0 -0
- package/cmaps/ETen-B5-H.bcmap +0 -0
- package/cmaps/ETen-B5-V.bcmap +0 -0
- package/cmaps/ETenms-B5-H.bcmap +3 -0
- package/cmaps/ETenms-B5-V.bcmap +0 -0
- package/cmaps/EUC-H.bcmap +0 -0
- package/cmaps/EUC-V.bcmap +0 -0
- package/cmaps/Ext-H.bcmap +0 -0
- package/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/cmaps/Ext-V.bcmap +0 -0
- package/cmaps/GB-EUC-H.bcmap +0 -0
- package/cmaps/GB-EUC-V.bcmap +0 -0
- package/cmaps/GB-H.bcmap +4 -0
- package/cmaps/GB-V.bcmap +0 -0
- package/cmaps/GBK-EUC-H.bcmap +0 -0
- package/cmaps/GBK-EUC-V.bcmap +0 -0
- package/cmaps/GBK2K-H.bcmap +0 -0
- package/cmaps/GBK2K-V.bcmap +0 -0
- package/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/cmaps/GBT-EUC-H.bcmap +0 -0
- package/cmaps/GBT-EUC-V.bcmap +0 -0
- package/cmaps/GBT-H.bcmap +0 -0
- package/cmaps/GBT-V.bcmap +0 -0
- package/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/cmaps/H.bcmap +0 -0
- package/cmaps/HKdla-B5-H.bcmap +0 -0
- package/cmaps/HKdla-B5-V.bcmap +0 -0
- package/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/cmaps/HKm314-B5-H.bcmap +0 -0
- package/cmaps/HKm314-B5-V.bcmap +0 -0
- package/cmaps/HKm471-B5-H.bcmap +0 -0
- package/cmaps/HKm471-B5-V.bcmap +0 -0
- package/cmaps/HKscs-B5-H.bcmap +0 -0
- package/cmaps/HKscs-B5-V.bcmap +0 -0
- package/cmaps/Hankaku.bcmap +0 -0
- package/cmaps/Hiragana.bcmap +0 -0
- package/cmaps/KSC-EUC-H.bcmap +0 -0
- package/cmaps/KSC-EUC-V.bcmap +0 -0
- package/cmaps/KSC-H.bcmap +0 -0
- package/cmaps/KSC-Johab-H.bcmap +0 -0
- package/cmaps/KSC-Johab-V.bcmap +0 -0
- package/cmaps/KSC-V.bcmap +0 -0
- package/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/cmaps/Katakana.bcmap +0 -0
- package/cmaps/LICENSE +36 -0
- package/cmaps/NWP-H.bcmap +0 -0
- package/cmaps/NWP-V.bcmap +0 -0
- package/cmaps/RKSJ-H.bcmap +0 -0
- package/cmaps/RKSJ-V.bcmap +0 -0
- package/cmaps/Roman.bcmap +0 -0
- package/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/cmaps/V.bcmap +0 -0
- package/cmaps/WP-Symbol.bcmap +0 -0
- package/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/iccs/LICENSE +116 -0
- package/image_decoders/pdf.image_decoders.min.mjs +28 -0
- package/image_decoders/pdf.image_decoders.mjs +5378 -0
- package/image_decoders/pdf.image_decoders.mjs.map +1 -0
- package/legacy/build/pdf.d.mts +1 -0
- package/legacy/build/pdf.min.mjs +27 -0
- package/legacy/build/pdf.mjs +34799 -0
- package/legacy/build/pdf.mjs.map +1 -0
- package/legacy/build/pdf.sandbox.min.mjs +27 -0
- package/legacy/build/pdf.sandbox.mjs +2502 -0
- package/legacy/build/pdf.sandbox.mjs.map +1 -0
- package/legacy/build/pdf.worker.min.mjs +27 -0
- package/legacy/build/pdf.worker.mjs +71124 -0
- package/legacy/build/pdf.worker.mjs.map +1 -0
- package/legacy/image_decoders/pdf.image_decoders.min.mjs +27 -0
- package/legacy/image_decoders/pdf.image_decoders.mjs +9845 -0
- package/legacy/image_decoders/pdf.image_decoders.mjs.map +1 -0
- package/legacy/web/images/altText_add.svg +3 -0
- package/legacy/web/images/altText_disclaimer.svg +3 -0
- package/legacy/web/images/altText_done.svg +3 -0
- package/legacy/web/images/altText_spinner.svg +30 -0
- package/legacy/web/images/altText_warning.svg +3 -0
- package/legacy/web/images/annotation-check.svg +11 -0
- package/legacy/web/images/annotation-comment.svg +16 -0
- package/legacy/web/images/annotation-help.svg +26 -0
- package/legacy/web/images/annotation-insert.svg +10 -0
- package/legacy/web/images/annotation-key.svg +11 -0
- package/legacy/web/images/annotation-newparagraph.svg +11 -0
- package/legacy/web/images/annotation-noicon.svg +7 -0
- package/legacy/web/images/annotation-note.svg +42 -0
- package/legacy/web/images/annotation-paperclip.svg +6 -0
- package/legacy/web/images/annotation-paragraph.svg +16 -0
- package/legacy/web/images/annotation-pushpin.svg +7 -0
- package/legacy/web/images/checkmark.svg +5 -0
- package/legacy/web/images/comment-actionsButton.svg +3 -0
- package/legacy/web/images/comment-closeButton.svg +3 -0
- package/legacy/web/images/comment-editButton.svg +8 -0
- package/legacy/web/images/comment-popup-editButton.svg +5 -0
- package/legacy/web/images/cursor-editorFreeHighlight.svg +6 -0
- package/legacy/web/images/cursor-editorFreeText.svg +3 -0
- package/legacy/web/images/cursor-editorInk.svg +4 -0
- package/legacy/web/images/cursor-editorTextHighlight.svg +8 -0
- package/legacy/web/images/editor-toolbar-delete.svg +5 -0
- package/legacy/web/images/editor-toolbar-edit.svg +3 -0
- package/legacy/web/images/findbarButton-next.svg +3 -0
- package/legacy/web/images/findbarButton-previous.svg +3 -0
- package/legacy/web/images/gv-toolbarButton-download.svg +3 -0
- package/legacy/web/images/loading-icon.gif +0 -0
- package/legacy/web/images/loading.svg +1 -0
- package/legacy/web/images/messageBar_closingButton.svg +3 -0
- package/legacy/web/images/messageBar_info.svg +3 -0
- package/legacy/web/images/messageBar_warning.svg +3 -0
- package/legacy/web/images/pages_closeButton.svg +3 -0
- package/legacy/web/images/pages_selected.svg +7 -0
- package/legacy/web/images/pages_viewArrow.svg +3 -0
- package/legacy/web/images/pages_viewButton.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-handTool.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/legacy/web/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/legacy/web/images/signature-properties-row-check.svg +4 -0
- package/legacy/web/images/toolbarButton-bookmark.svg +3 -0
- package/legacy/web/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/legacy/web/images/toolbarButton-download.svg +4 -0
- package/legacy/web/images/toolbarButton-editorFreeText.svg +5 -0
- package/legacy/web/images/toolbarButton-editorHighlight.svg +6 -0
- package/legacy/web/images/toolbarButton-editorInk.svg +4 -0
- package/legacy/web/images/toolbarButton-editorSignature.svg +6 -0
- package/legacy/web/images/toolbarButton-editorStamp.svg +8 -0
- package/legacy/web/images/toolbarButton-menuArrow.svg +3 -0
- package/legacy/web/images/toolbarButton-menuArrowNova.svg +3 -0
- package/legacy/web/images/toolbarButton-openFile.svg +3 -0
- package/legacy/web/images/toolbarButton-pageDown.svg +3 -0
- package/legacy/web/images/toolbarButton-pageUp.svg +3 -0
- package/legacy/web/images/toolbarButton-presentationMode.svg +3 -0
- package/legacy/web/images/toolbarButton-print.svg +3 -0
- package/legacy/web/images/toolbarButton-search.svg +3 -0
- package/legacy/web/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/legacy/web/images/toolbarButton-signaturePropertiesError.svg +7 -0
- package/legacy/web/images/toolbarButton-signaturePropertiesVerified.svg +7 -0
- package/legacy/web/images/toolbarButton-viewAttachments.svg +3 -0
- package/legacy/web/images/toolbarButton-viewLayers.svg +3 -0
- package/legacy/web/images/toolbarButton-viewOutline.svg +3 -0
- package/legacy/web/images/toolbarButton-viewThumbnail.svg +3 -0
- package/legacy/web/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/legacy/web/images/toolbarButton-zoomIn.svg +3 -0
- package/legacy/web/images/toolbarButton-zoomOut.svg +3 -0
- package/legacy/web/images/treeitem-collapsed.svg +1 -0
- package/legacy/web/images/treeitem-expanded.svg +1 -0
- package/legacy/web/pdf_viewer.css +6463 -0
- package/legacy/web/pdf_viewer.d.mts +1 -0
- package/legacy/web/pdf_viewer.mjs +14798 -0
- package/legacy/web/pdf_viewer.mjs.map +1 -0
- package/legacy/webpack.mjs +26 -0
- package/package.json +33 -4
- package/standard_fonts/FoxitDingbats.pfb +0 -0
- package/standard_fonts/FoxitFixed.pfb +0 -0
- package/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/standard_fonts/FoxitSerif.pfb +0 -0
- package/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/standard_fonts/FoxitSymbol.pfb +0 -0
- package/standard_fonts/LICENSE_FOXIT +27 -0
- package/standard_fonts/LICENSE_LIBERATION +363 -0
- package/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/types/external/brotli/decode.d.ts +5 -0
- package/types/external/jbig2/jbig2.d.ts +2 -0
- package/types/external/openjpeg/openjpeg.d.ts +2 -0
- package/types/external/qcms/qcms.d.ts +96 -0
- package/types/external/qcms/qcms_utils.d.ts +9 -0
- package/types/src/core/ascii_85_stream.d.ts +7 -0
- package/types/src/core/ascii_hex_stream.d.ts +7 -0
- package/types/src/core/base_stream.d.ts +52 -0
- package/types/src/core/brotli_stream.d.ts +9 -0
- package/types/src/core/calculate_md5.d.ts +1 -0
- package/types/src/core/calculate_sha256.d.ts +1 -0
- package/types/src/core/calculate_sha_other.d.ts +2 -0
- package/types/src/core/catalog.d.ts +169 -0
- package/types/src/core/ccitt_stream.d.ts +18 -0
- package/types/src/core/cleanup_helper.d.ts +1 -0
- package/types/src/core/colorspace.d.ts +168 -0
- package/types/src/core/colorspace_utils.d.ts +21 -0
- package/types/src/core/core_utils.d.ts +136 -0
- package/types/src/core/crypto.d.ts +135 -0
- package/types/src/core/decode_stream.d.ts +32 -0
- package/types/src/core/decrypt_stream.d.ts +9 -0
- package/types/src/core/file_spec.d.ts +67 -0
- package/types/src/core/flate_stream.d.ts +14 -0
- package/types/src/core/icc_colorspace.d.ts +21 -0
- package/types/src/core/image_resizer.d.ts +24 -0
- package/types/src/core/image_utils.d.ts +52 -0
- package/types/src/core/jbig2_ccittFax.d.ts +13 -0
- package/types/src/core/jbig2_stream.d.ts +17 -0
- package/types/src/core/jpeg_stream.d.ts +24 -0
- package/types/src/core/jpg.d.ts +58 -0
- package/types/src/core/jpx.d.ts +24 -0
- package/types/src/core/jpx_stream.d.ts +15 -0
- package/types/src/core/lzw_stream.d.ts +19 -0
- package/types/src/core/metadata_parser.d.ts +13 -0
- package/types/src/core/name_number_tree.d.ts +21 -0
- package/types/src/core/parser.d.ts +119 -0
- package/types/src/core/pattern.d.ts +61 -0
- package/types/src/core/predictor_stream.d.ts +14 -0
- package/types/src/core/primitives.d.ts +95 -0
- package/types/src/core/run_length_stream.d.ts +6 -0
- package/types/src/core/sasl_prep.d.ts +1 -0
- package/types/src/core/sound.d.ts +39 -0
- package/types/src/core/stream.d.ts +20 -0
- package/types/src/core/string_utils.d.ts +5 -0
- package/types/src/core/struct_tree.d.ts +93 -0
- package/types/src/core/unicode.d.ts +5 -0
- package/types/src/core/wasm_image.d.ts +21 -0
- package/types/src/core/xml_parser.d.ts +78 -0
- package/types/src/core/xref.d.ts +39 -0
- package/types/src/display/annotation_layer.d.ts +265 -0
- package/types/src/display/annotation_storage.d.ts +94 -0
- package/types/src/display/api.d.ts +1693 -0
- package/types/src/display/api_utils.d.ts +13 -0
- package/types/src/display/binary_data_factory.d.ts +22 -0
- package/types/src/display/canvas.d.ts +257 -0
- package/types/src/display/canvas_dependency_tracker.d.ts +221 -0
- package/types/src/display/canvas_factory.d.ts +29 -0
- package/types/src/display/content_disposition.d.ts +6 -0
- package/types/src/display/display_utils.d.ts +172 -0
- package/types/src/display/draw_layer.d.ts +143 -0
- package/types/src/display/editor/alt_text.d.ts +34 -0
- package/types/src/display/editor/annotation_editor_layer.d.ts +226 -0
- package/types/src/display/editor/color_picker.d.ts +40 -0
- package/types/src/display/editor/comment.d.ts +59 -0
- package/types/src/display/editor/draw.d.ts +175 -0
- package/types/src/display/editor/drawers/contour.d.ts +3 -0
- package/types/src/display/editor/drawers/freedraw.d.ts +34 -0
- package/types/src/display/editor/drawers/highlight.d.ts +120 -0
- package/types/src/display/editor/drawers/inkdraw.d.ts +134 -0
- package/types/src/display/editor/drawers/outline.d.ts +81 -0
- package/types/src/display/editor/drawers/signaturedraw.d.ts +79 -0
- package/types/src/display/editor/editor.d.ts +581 -0
- package/types/src/display/editor/freetext.d.ts +63 -0
- package/types/src/display/editor/highlight.d.ts +85 -0
- package/types/src/display/editor/ink.d.ts +49 -0
- package/types/src/display/editor/signature.d.ts +77 -0
- package/types/src/display/editor/stamp.d.ts +49 -0
- package/types/src/display/editor/toolbar.d.ts +26 -0
- package/types/src/display/editor/tools.d.ts +503 -0
- package/types/src/display/fetch_stream.d.ts +7 -0
- package/types/src/display/filter_factory.d.ts +53 -0
- package/types/src/display/font_loader.d.ts +52 -0
- package/types/src/display/metadata.d.ts +10 -0
- package/types/src/display/network.d.ts +20 -0
- package/types/src/display/network_stream.d.ts +2 -0
- package/types/src/display/network_utils.d.ts +16 -0
- package/types/src/display/node_stream.d.ts +4 -0
- package/types/src/display/node_utils.d.ts +18 -0
- package/types/src/display/obj_bin_transform_display.d.ts +50 -0
- package/types/src/display/optional_content_config.d.ts +28 -0
- package/types/src/display/page_viewport.d.ts +137 -0
- package/types/src/display/pages_mapper.d.ts +78 -0
- package/types/src/display/pattern_helper.d.ts +88 -0
- package/types/src/display/pdf_objects.d.ts +38 -0
- package/types/src/display/svg_factory.d.ts +14 -0
- package/types/src/display/text_layer.d.ts +93 -0
- package/types/src/display/text_layer_images.d.ts +10 -0
- package/types/src/display/touch_manager.d.ts +55 -0
- package/types/src/display/transport_stream.d.ts +11 -0
- package/types/src/display/webgpu.d.ts +11 -0
- package/types/src/display/worker_options.d.ts +25 -0
- package/types/src/display/xfa_layer.d.ts +49 -0
- package/types/src/display/xfa_text.d.ts +18 -0
- package/types/src/pdf.d.ts +69 -0
- package/types/src/shared/base_pdf_stream.d.ts +120 -0
- package/types/src/shared/css_utils.d.ts +8 -0
- package/types/src/shared/image_utils.d.ts +28 -0
- package/types/src/shared/internal_evt.d.ts +7 -0
- package/types/src/shared/math_clamp.d.ts +1 -0
- package/types/src/shared/message_handler.d.ts +39 -0
- package/types/src/shared/murmurhash3.d.ts +7 -0
- package/types/src/shared/obj_bin_transform_utils.d.ts +27 -0
- package/types/src/shared/scripting_utils.d.ts +18 -0
- package/types/src/shared/util.d.ts +433 -0
- package/types/web/annotation_editor_layer_builder.d.ts +66 -0
- package/types/web/annotation_layer_builder.d.ts +107 -0
- package/types/web/app_options.d.ts +16 -0
- package/types/web/autolinker.d.ts +29 -0
- package/types/web/base_download_manager.d.ts +24 -0
- package/types/web/base_pdf_page_view.d.ts +29 -0
- package/types/web/comment_manager.d.ts +20 -0
- package/types/web/download_manager.d.ts +4 -0
- package/types/web/draw_layer_builder.d.ts +64 -0
- package/types/web/event_utils.d.ts +68 -0
- package/types/web/generic_scripting.d.ts +8 -0
- package/types/web/genericl10n.d.ts +18 -0
- package/types/web/internal_evt.d.ts +7 -0
- package/types/web/l10n.d.ts +31 -0
- package/types/web/menu.d.ts +11 -0
- package/types/web/pdf_find_controller.d.ts +142 -0
- package/types/web/pdf_find_utils.d.ts +10 -0
- package/types/web/pdf_history.d.ts +116 -0
- package/types/web/pdf_link_service.d.ts +148 -0
- package/types/web/pdf_page_detail_view.d.ts +27 -0
- package/types/web/pdf_page_view.d.ts +256 -0
- package/types/web/pdf_rendering_queue.d.ts +49 -0
- package/types/web/pdf_scripting_manager.component.d.ts +5 -0
- package/types/web/pdf_scripting_manager.d.ts +57 -0
- package/types/web/pdf_single_page_viewer.d.ts +7 -0
- package/types/web/pdf_thumbnail_view.d.ts +108 -0
- package/types/web/pdf_thumbnail_viewer.d.ts +179 -0
- package/types/web/pdf_viewer.component.d.ts +23 -0
- package/types/web/pdf_viewer.d.ts +653 -0
- package/types/web/renderable_view.d.ts +33 -0
- package/types/web/sidebar.d.ts +65 -0
- package/types/web/struct_tree_layer_builder.d.ts +39 -0
- package/types/web/text_accessibility.d.ts +46 -0
- package/types/web/text_highlighter.d.ts +62 -0
- package/types/web/text_layer_builder.d.ts +70 -0
- package/types/web/ui_utils.d.ts +260 -0
- package/types/web/xfa_layer_builder.d.ts +50 -0
- package/wasm/LICENSE_JBIG2 +196 -0
- package/wasm/LICENSE_OPENJPEG +39 -0
- package/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/wasm/LICENSE_QCMS +21 -0
- package/wasm/jbig2.wasm +0 -0
- package/wasm/jbig2_nowasm_fallback.js +15 -0
- package/wasm/openjpeg.wasm +0 -0
- package/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/wasm/qcms_bg.wasm +0 -0
- package/wasm/quickjs-eval.js +16 -0
- package/wasm/quickjs-eval.wasm +0 -0
- package/web/images/altText_add.svg +3 -0
- package/web/images/altText_disclaimer.svg +3 -0
- package/web/images/altText_done.svg +3 -0
- package/web/images/altText_spinner.svg +30 -0
- package/web/images/altText_warning.svg +3 -0
- package/web/images/annotation-check.svg +11 -0
- package/web/images/annotation-comment.svg +16 -0
- package/web/images/annotation-help.svg +26 -0
- package/web/images/annotation-insert.svg +10 -0
- package/web/images/annotation-key.svg +11 -0
- package/web/images/annotation-newparagraph.svg +11 -0
- package/web/images/annotation-noicon.svg +7 -0
- package/web/images/annotation-note.svg +42 -0
- package/web/images/annotation-paperclip.svg +6 -0
- package/web/images/annotation-paragraph.svg +16 -0
- package/web/images/annotation-pushpin.svg +7 -0
- package/web/images/checkmark.svg +5 -0
- package/web/images/comment-actionsButton.svg +3 -0
- package/web/images/comment-closeButton.svg +3 -0
- package/web/images/comment-editButton.svg +8 -0
- package/web/images/comment-popup-editButton.svg +5 -0
- package/web/images/cursor-editorFreeHighlight.svg +6 -0
- package/web/images/cursor-editorFreeText.svg +3 -0
- package/web/images/cursor-editorInk.svg +4 -0
- package/web/images/cursor-editorTextHighlight.svg +8 -0
- package/web/images/editor-toolbar-delete.svg +5 -0
- package/web/images/editor-toolbar-edit.svg +3 -0
- package/web/images/findbarButton-next.svg +3 -0
- package/web/images/findbarButton-previous.svg +3 -0
- package/web/images/gv-toolbarButton-download.svg +3 -0
- package/web/images/loading-icon.gif +0 -0
- package/web/images/loading.svg +1 -0
- package/web/images/messageBar_closingButton.svg +3 -0
- package/web/images/messageBar_info.svg +3 -0
- package/web/images/messageBar_warning.svg +3 -0
- package/web/images/pages_closeButton.svg +3 -0
- package/web/images/pages_selected.svg +7 -0
- package/web/images/pages_viewArrow.svg +3 -0
- package/web/images/pages_viewButton.svg +3 -0
- package/web/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/web/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/web/images/secondaryToolbarButton-handTool.svg +3 -0
- package/web/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/web/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/web/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/web/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/web/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/web/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/web/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/web/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/web/images/signature-properties-row-check.svg +4 -0
- package/web/images/toolbarButton-bookmark.svg +3 -0
- package/web/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/web/images/toolbarButton-download.svg +4 -0
- package/web/images/toolbarButton-editorFreeText.svg +5 -0
- package/web/images/toolbarButton-editorHighlight.svg +6 -0
- package/web/images/toolbarButton-editorInk.svg +4 -0
- package/web/images/toolbarButton-editorSignature.svg +6 -0
- package/web/images/toolbarButton-editorStamp.svg +8 -0
- package/web/images/toolbarButton-menuArrow.svg +3 -0
- package/web/images/toolbarButton-menuArrowNova.svg +3 -0
- package/web/images/toolbarButton-openFile.svg +3 -0
- package/web/images/toolbarButton-pageDown.svg +3 -0
- package/web/images/toolbarButton-pageUp.svg +3 -0
- package/web/images/toolbarButton-presentationMode.svg +3 -0
- package/web/images/toolbarButton-print.svg +3 -0
- package/web/images/toolbarButton-search.svg +3 -0
- package/web/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/web/images/toolbarButton-signaturePropertiesError.svg +7 -0
- package/web/images/toolbarButton-signaturePropertiesVerified.svg +7 -0
- package/web/images/toolbarButton-viewAttachments.svg +3 -0
- package/web/images/toolbarButton-viewLayers.svg +3 -0
- package/web/images/toolbarButton-viewOutline.svg +3 -0
- package/web/images/toolbarButton-viewThumbnail.svg +3 -0
- package/web/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/web/images/toolbarButton-zoomIn.svg +3 -0
- package/web/images/toolbarButton-zoomOut.svg +3 -0
- package/web/images/treeitem-collapsed.svg +1 -0
- package/web/images/treeitem-expanded.svg +1 -0
- package/web/pdf_viewer.css +6463 -0
- package/web/pdf_viewer.d.mts +1 -0
- package/web/pdf_viewer.mjs +9811 -0
- package/web/pdf_viewer.mjs.map +1 -0
- package/webpack.mjs +26 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export class CssFontInfo {
|
|
2
|
+
constructor(buffer: any);
|
|
3
|
+
get fontFamily(): any;
|
|
4
|
+
get fontWeight(): any;
|
|
5
|
+
get italicAngle(): any;
|
|
6
|
+
#private;
|
|
7
|
+
}
|
|
8
|
+
export class FontInfo {
|
|
9
|
+
constructor(buffer: any);
|
|
10
|
+
get black(): any;
|
|
11
|
+
get bold(): any;
|
|
12
|
+
get disableFontFace(): any;
|
|
13
|
+
get fontExtraProperties(): any;
|
|
14
|
+
get isInvalidPDFjsFont(): any;
|
|
15
|
+
get isType3Font(): any;
|
|
16
|
+
get italic(): any;
|
|
17
|
+
get missingFile(): any;
|
|
18
|
+
get remeasure(): any;
|
|
19
|
+
get vertical(): any;
|
|
20
|
+
get bbox(): any;
|
|
21
|
+
get fontMatrix(): any;
|
|
22
|
+
get fallbackName(): any;
|
|
23
|
+
get loadedName(): any;
|
|
24
|
+
get data(): Uint8Array<any> | undefined;
|
|
25
|
+
clearData(): void;
|
|
26
|
+
get cssFontInfo(): any;
|
|
27
|
+
get systemFontInfo(): any;
|
|
28
|
+
#private;
|
|
29
|
+
}
|
|
30
|
+
export class FontPathInfo {
|
|
31
|
+
constructor(buffer: any);
|
|
32
|
+
get path(): any;
|
|
33
|
+
#private;
|
|
34
|
+
}
|
|
35
|
+
export class PatternInfo {
|
|
36
|
+
constructor(buffer: any);
|
|
37
|
+
buffer: any;
|
|
38
|
+
view: DataView<any>;
|
|
39
|
+
data: Uint8Array<any>;
|
|
40
|
+
getIR(): (string | number | number[] | Float32Array<any> | Uint8Array<any> | null)[] | (string | number | number[] | (string | number)[][] | null)[];
|
|
41
|
+
}
|
|
42
|
+
export class SystemFontInfo {
|
|
43
|
+
constructor(buffer: any);
|
|
44
|
+
get css(): any;
|
|
45
|
+
get loadedName(): any;
|
|
46
|
+
get baseFontName(): any;
|
|
47
|
+
get src(): any;
|
|
48
|
+
get style(): any;
|
|
49
|
+
#private;
|
|
50
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export class OptionalContentConfig {
|
|
2
|
+
static fromSerializable({ data, renderingIntent, groupState }: {
|
|
3
|
+
data: any;
|
|
4
|
+
renderingIntent: any;
|
|
5
|
+
groupState: any;
|
|
6
|
+
}): OptionalContentConfig;
|
|
7
|
+
constructor(data: any, renderingIntent?: number, groupState?: null);
|
|
8
|
+
creator: null;
|
|
9
|
+
name: null;
|
|
10
|
+
renderingIntent: number;
|
|
11
|
+
isVisible(group: any): any;
|
|
12
|
+
setVisibility(id: any, visible?: boolean, preserveRB?: boolean): void;
|
|
13
|
+
setOCGState({ state, preserveRB }: {
|
|
14
|
+
state: any;
|
|
15
|
+
preserveRB: any;
|
|
16
|
+
}): void;
|
|
17
|
+
get hasInitialVisibility(): boolean;
|
|
18
|
+
getOrder(): any;
|
|
19
|
+
getGroup(id: any): any;
|
|
20
|
+
getHash(): string;
|
|
21
|
+
get serializable(): {
|
|
22
|
+
data: any;
|
|
23
|
+
renderingIntent: number;
|
|
24
|
+
groupState: Map<any, any>;
|
|
25
|
+
};
|
|
26
|
+
[Symbol.iterator](): MapIterator<[any, any]>;
|
|
27
|
+
#private;
|
|
28
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export type PageViewportParameters = {
|
|
2
|
+
/**
|
|
3
|
+
* - The xMin, yMin, xMax and
|
|
4
|
+
* yMax coordinates.
|
|
5
|
+
*/
|
|
6
|
+
viewBox: Array<number>;
|
|
7
|
+
/**
|
|
8
|
+
* - The size of units.
|
|
9
|
+
*/
|
|
10
|
+
userUnit: number;
|
|
11
|
+
/**
|
|
12
|
+
* - The scale of the viewport.
|
|
13
|
+
*/
|
|
14
|
+
scale: number;
|
|
15
|
+
/**
|
|
16
|
+
* - The rotation, in degrees, of the viewport.
|
|
17
|
+
*/
|
|
18
|
+
rotation: number;
|
|
19
|
+
/**
|
|
20
|
+
* - The horizontal, i.e. x-axis, offset. The
|
|
21
|
+
* default value is `0`.
|
|
22
|
+
*/
|
|
23
|
+
offsetX?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* - The vertical, i.e. y-axis, offset. The
|
|
26
|
+
* default value is `0`.
|
|
27
|
+
*/
|
|
28
|
+
offsetY?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* - If true, the y-axis will not be flipped.
|
|
31
|
+
* The default value is `false`.
|
|
32
|
+
*/
|
|
33
|
+
dontFlip?: boolean | undefined;
|
|
34
|
+
};
|
|
35
|
+
export type PageViewportCloneParameters = {
|
|
36
|
+
/**
|
|
37
|
+
* - The scale, overriding the one in the cloned
|
|
38
|
+
* viewport. The default value is `this.scale`.
|
|
39
|
+
*/
|
|
40
|
+
scale?: number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* - The rotation, in degrees, overriding the one
|
|
43
|
+
* in the cloned viewport. The default value is `this.rotation`.
|
|
44
|
+
*/
|
|
45
|
+
rotation?: number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* - The horizontal, i.e. x-axis, offset.
|
|
48
|
+
* The default value is `this.offsetX`.
|
|
49
|
+
*/
|
|
50
|
+
offsetX?: number | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* - The vertical, i.e. y-axis, offset.
|
|
53
|
+
* The default value is `this.offsetY`.
|
|
54
|
+
*/
|
|
55
|
+
offsetY?: number | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* - If true, the x-axis will not be flipped.
|
|
58
|
+
* The default value is `false`.
|
|
59
|
+
*/
|
|
60
|
+
dontFlip?: boolean | undefined;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* @typedef {object} PageViewportParameters
|
|
64
|
+
* @property {Array<number>} viewBox - The xMin, yMin, xMax and
|
|
65
|
+
* yMax coordinates.
|
|
66
|
+
* @property {number} userUnit - The size of units.
|
|
67
|
+
* @property {number} scale - The scale of the viewport.
|
|
68
|
+
* @property {number} rotation - The rotation, in degrees, of the viewport.
|
|
69
|
+
* @property {number} [offsetX] - The horizontal, i.e. x-axis, offset. The
|
|
70
|
+
* default value is `0`.
|
|
71
|
+
* @property {number} [offsetY] - The vertical, i.e. y-axis, offset. The
|
|
72
|
+
* default value is `0`.
|
|
73
|
+
* @property {boolean} [dontFlip] - If true, the y-axis will not be flipped.
|
|
74
|
+
* The default value is `false`.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* @typedef {object} PageViewportCloneParameters
|
|
78
|
+
* @property {number} [scale] - The scale, overriding the one in the cloned
|
|
79
|
+
* viewport. The default value is `this.scale`.
|
|
80
|
+
* @property {number} [rotation] - The rotation, in degrees, overriding the one
|
|
81
|
+
* in the cloned viewport. The default value is `this.rotation`.
|
|
82
|
+
* @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.
|
|
83
|
+
* The default value is `this.offsetX`.
|
|
84
|
+
* @property {number} [offsetY] - The vertical, i.e. y-axis, offset.
|
|
85
|
+
* The default value is `this.offsetY`.
|
|
86
|
+
* @property {boolean} [dontFlip] - If true, the x-axis will not be flipped.
|
|
87
|
+
* The default value is `false`.
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* PDF page viewport created based on scale, rotation and offset.
|
|
91
|
+
*/
|
|
92
|
+
export class PageViewport {
|
|
93
|
+
/**
|
|
94
|
+
* @param {PageViewportParameters} params
|
|
95
|
+
*/
|
|
96
|
+
constructor({ viewBox, userUnit, scale, rotation, offsetX, offsetY, dontFlip, }: PageViewportParameters);
|
|
97
|
+
viewBox: number[];
|
|
98
|
+
userUnit: number;
|
|
99
|
+
scale: number;
|
|
100
|
+
rotation: number;
|
|
101
|
+
offsetX: number;
|
|
102
|
+
offsetY: number;
|
|
103
|
+
transform: number[];
|
|
104
|
+
width: number;
|
|
105
|
+
height: number;
|
|
106
|
+
/**
|
|
107
|
+
* The original, un-scaled, viewport dimensions.
|
|
108
|
+
* @type {object}
|
|
109
|
+
*/
|
|
110
|
+
get rawDims(): object;
|
|
111
|
+
/**
|
|
112
|
+
* Clones viewport, with optional additional properties.
|
|
113
|
+
* @param {PageViewportCloneParameters} [params]
|
|
114
|
+
* @returns {PageViewport} Cloned viewport.
|
|
115
|
+
*/
|
|
116
|
+
clone({ scale, rotation, offsetX, offsetY, dontFlip, }?: PageViewportCloneParameters): PageViewport;
|
|
117
|
+
/**
|
|
118
|
+
* Converts PDF point to the viewport coordinates. For examples, useful for
|
|
119
|
+
* converting PDF location into canvas pixel coordinates.
|
|
120
|
+
* @param {number} x - The x-coordinate.
|
|
121
|
+
* @param {number} y - The y-coordinate.
|
|
122
|
+
* @returns {Array} Array containing `x`- and `y`-coordinates of the
|
|
123
|
+
* point in the viewport coordinate space.
|
|
124
|
+
* @see {@link convertToPdfPoint}
|
|
125
|
+
*/
|
|
126
|
+
convertToViewportPoint(x: number, y: number): any[];
|
|
127
|
+
/**
|
|
128
|
+
* Converts viewport coordinates to the PDF location. For examples, useful
|
|
129
|
+
* for converting canvas pixel location into PDF one.
|
|
130
|
+
* @param {number} x - The x-coordinate.
|
|
131
|
+
* @param {number} y - The y-coordinate.
|
|
132
|
+
* @returns {Array} Array containing `x`- and `y`-coordinates of the
|
|
133
|
+
* point in the PDF coordinate space.
|
|
134
|
+
* @see {@link convertToViewportPoint}
|
|
135
|
+
*/
|
|
136
|
+
convertToPdfPoint(x: number, y: number): any[];
|
|
137
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps between page IDs and page numbers, allowing bidirectional conversion
|
|
3
|
+
* between the two representations. This is useful when the page numbering
|
|
4
|
+
* in the PDF document doesn't match the default sequential ordering.
|
|
5
|
+
*
|
|
6
|
+
* When #pageNumberToId is null the mapping is the identity (page N has ID N).
|
|
7
|
+
*/
|
|
8
|
+
export class PagesMapper {
|
|
9
|
+
set pagesNumber(n: number);
|
|
10
|
+
get pagesNumber(): number;
|
|
11
|
+
/**
|
|
12
|
+
* Move a set of pages to a new position.
|
|
13
|
+
* @param {Set<number>} selectedPages - Page numbers being moved (1-indexed).
|
|
14
|
+
* @param {number[]} pagesToMove - Ordered list of page numbers to move.
|
|
15
|
+
* @param {number} index - Zero-based insertion index in the page-number list.
|
|
16
|
+
*/
|
|
17
|
+
movePages(selectedPages: Set<number>, pagesToMove: number[], index: number): void;
|
|
18
|
+
/**
|
|
19
|
+
* Deletes a set of pages.
|
|
20
|
+
* @param {Array<number>} pagesToDelete - Page numbers to delete (1-indexed),
|
|
21
|
+
* unique and sorted ascending.
|
|
22
|
+
*/
|
|
23
|
+
deletePages(pagesToDelete: Array<number>): void;
|
|
24
|
+
cancelDelete(): void;
|
|
25
|
+
cleanSavedData(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Records which pages are being copied so that pastePages can insert them.
|
|
28
|
+
* @param {Uint32Array} pagesToCopy - Page numbers to copy (1-indexed).
|
|
29
|
+
*/
|
|
30
|
+
copyPages(pagesToCopy: Uint32Array): void;
|
|
31
|
+
cancelCopy(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Inserts the previously copied pages at the given position.
|
|
34
|
+
* @param {number} index - Zero-based insertion index in the page-number list.
|
|
35
|
+
*/
|
|
36
|
+
pastePages(index: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the page mappings have been altered from their initial state.
|
|
39
|
+
* @returns {boolean}
|
|
40
|
+
*/
|
|
41
|
+
hasBeenAltered(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the current page mapping suitable for saving.
|
|
44
|
+
* @param {Map<number, Array<number>>} [idToPageNumber]
|
|
45
|
+
* @param {Int32Array} [copyLevels]
|
|
46
|
+
* @returns {{pageInfos: Array<object>, copyLevels: Int32Array | null}}
|
|
47
|
+
*/
|
|
48
|
+
getPageMappingForSaving(idToPageNumber?: Map<number, Array<number>>, copyLevels?: Int32Array): {
|
|
49
|
+
pageInfos: Array<object>;
|
|
50
|
+
copyLevels: Int32Array | null;
|
|
51
|
+
};
|
|
52
|
+
extractPages(extractedPageNumbers: any): {
|
|
53
|
+
pageInfos: Array<object>;
|
|
54
|
+
copyLevels: Int32Array | null;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Gets the previous page number for a given page number.
|
|
58
|
+
* Negative values indicate a copied page (the absolute value is the source).
|
|
59
|
+
* @param {number} pageNumber
|
|
60
|
+
* @returns {number}
|
|
61
|
+
*/
|
|
62
|
+
getPrevPageNumber(pageNumber: number): number;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the first page number that currently maps to the given page ID.
|
|
65
|
+
* @param {number} id - The page ID (1-indexed).
|
|
66
|
+
* @returns {number} The page number, or 0 if not found.
|
|
67
|
+
*/
|
|
68
|
+
getPageNumber(id: number): number;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the page ID for a given page number.
|
|
71
|
+
* @param {number} pageNumber - The page number (1-indexed).
|
|
72
|
+
* @returns {number} The page ID, or the page number itself if no mapping
|
|
73
|
+
* exists.
|
|
74
|
+
*/
|
|
75
|
+
getPageId(pageNumber: number): number;
|
|
76
|
+
getMapping(): Uint32Array<ArrayBufferLike> | undefined;
|
|
77
|
+
#private;
|
|
78
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export function getShadingPattern(IR: any): RadialAxialShadingPattern | MeshShadingPattern | DummyShadingPattern;
|
|
2
|
+
export namespace PathType {
|
|
3
|
+
let FILL: string;
|
|
4
|
+
let STROKE: string;
|
|
5
|
+
let SHADING: string;
|
|
6
|
+
}
|
|
7
|
+
export class TilingPattern {
|
|
8
|
+
static MAX_PATTERN_SIZE: number;
|
|
9
|
+
constructor(IR: any, ctx: any, canvasGraphicsFactory: any, baseTransform: any);
|
|
10
|
+
color: any;
|
|
11
|
+
operatorList: any;
|
|
12
|
+
matrix: any;
|
|
13
|
+
bbox: any;
|
|
14
|
+
xstep: any;
|
|
15
|
+
ystep: any;
|
|
16
|
+
paintType: any;
|
|
17
|
+
tilingType: any;
|
|
18
|
+
needsIsolation: any;
|
|
19
|
+
ctx: any;
|
|
20
|
+
canvasGraphicsFactory: any;
|
|
21
|
+
baseTransform: any;
|
|
22
|
+
patternBaseMatrix: any;
|
|
23
|
+
canSkipPatternCanvas([width, height, offsetX, offsetY]: [any, any, any, any]): number[] | null;
|
|
24
|
+
updatePatternDims(clippedBBox: any, dims: any): void;
|
|
25
|
+
_renderTileCanvas(owner: any, opIdx: any, dimx: any, dimy: any): any;
|
|
26
|
+
_getCombinedScales(): number[];
|
|
27
|
+
drawPattern(owner: any, path: any, useEOFill: boolean | undefined, [n, m]: [any, any], opIdx: any): void;
|
|
28
|
+
createPatternCanvas(owner: any, opIdx: any): {
|
|
29
|
+
canvas: any;
|
|
30
|
+
canvasEntry: any;
|
|
31
|
+
scaleX: any;
|
|
32
|
+
scaleY: any;
|
|
33
|
+
offsetX: any;
|
|
34
|
+
offsetY: any;
|
|
35
|
+
};
|
|
36
|
+
getSizeAndScale(step: any, realOutputSize: any, scale: any): {
|
|
37
|
+
scale: any;
|
|
38
|
+
size: number;
|
|
39
|
+
};
|
|
40
|
+
clipBbox(graphics: any, x0: any, y0: any, x1: any, y1: any): void;
|
|
41
|
+
setFillAndStrokeStyleToContext(graphics: any, paintType: any, color: any): void;
|
|
42
|
+
isModifyingCurrentTransform(): boolean;
|
|
43
|
+
getPattern(ctx: any, owner: any, inverse: any, pathType: any, opIdx: any): any;
|
|
44
|
+
}
|
|
45
|
+
declare class RadialAxialShadingPattern extends BaseShadingPattern {
|
|
46
|
+
constructor(IR: any);
|
|
47
|
+
_type: any;
|
|
48
|
+
_bbox: any;
|
|
49
|
+
_colorStops: any;
|
|
50
|
+
_p0: any;
|
|
51
|
+
_p1: any;
|
|
52
|
+
_r0: any;
|
|
53
|
+
_r1: any;
|
|
54
|
+
isOriginBased(): boolean;
|
|
55
|
+
isRadial(): boolean;
|
|
56
|
+
areConic(): boolean;
|
|
57
|
+
_createGradient(ctx: any, transform?: null): any;
|
|
58
|
+
_createReversedGradient(ctx: any, transform?: null): any;
|
|
59
|
+
/** Rasterize a shading within its device-space bounding box. */
|
|
60
|
+
_createRasterPattern(ctx: any, owner: any, inverse: any, bbox: any, transform: any, transferMaps: any): any;
|
|
61
|
+
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
|
62
|
+
}
|
|
63
|
+
declare class MeshShadingPattern extends BaseShadingPattern {
|
|
64
|
+
constructor(IR: any);
|
|
65
|
+
_posData: any;
|
|
66
|
+
_colData: any;
|
|
67
|
+
_vertexCount: any;
|
|
68
|
+
_bounds: any;
|
|
69
|
+
_bbox: any;
|
|
70
|
+
_background: any;
|
|
71
|
+
_createMeshCanvas(combinedScale: any, backgroundColor: any, canvasFactory: any, transferMaps?: null): {
|
|
72
|
+
canvas: any;
|
|
73
|
+
offsetX: number;
|
|
74
|
+
offsetY: number;
|
|
75
|
+
scaleX: number;
|
|
76
|
+
scaleY: number;
|
|
77
|
+
};
|
|
78
|
+
getPattern(ctx: any, owner: any, inverse: any, pathType: any): any;
|
|
79
|
+
}
|
|
80
|
+
declare class DummyShadingPattern extends BaseShadingPattern {
|
|
81
|
+
getPattern(): string;
|
|
82
|
+
}
|
|
83
|
+
declare class BaseShadingPattern {
|
|
84
|
+
matrix: null;
|
|
85
|
+
isModifyingCurrentTransform(): boolean;
|
|
86
|
+
getPattern(): void;
|
|
87
|
+
}
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A PDF document and page is built of many objects. E.g. there are objects for
|
|
3
|
+
* fonts, images, rendering code, etc. These objects may get processed inside of
|
|
4
|
+
* a worker. This class implements some basic methods to manage these objects.
|
|
5
|
+
*/
|
|
6
|
+
export class PDFObjects {
|
|
7
|
+
/**
|
|
8
|
+
* If called *without* callback, this returns the data of `objId` but the
|
|
9
|
+
* object needs to be resolved. If it isn't, this method throws.
|
|
10
|
+
*
|
|
11
|
+
* If called *with* a callback, the callback is called with the data of the
|
|
12
|
+
* object once the object is resolved. That means, if you call this method
|
|
13
|
+
* and the object is already resolved, the callback gets called right away.
|
|
14
|
+
* @param {string} objId
|
|
15
|
+
* @param {Function} [callback]
|
|
16
|
+
* @returns {any}
|
|
17
|
+
*/
|
|
18
|
+
get(objId: string, callback?: Function): any;
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} objId
|
|
21
|
+
* @returns {boolean}
|
|
22
|
+
*/
|
|
23
|
+
has(objId: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @param {string} objId
|
|
26
|
+
* @returns {boolean}
|
|
27
|
+
*/
|
|
28
|
+
delete(objId: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Resolves the object `objId` with optional `data`.
|
|
31
|
+
* @param {string} objId
|
|
32
|
+
* @param {any} [data]
|
|
33
|
+
*/
|
|
34
|
+
resolve(objId: string, data?: any): void;
|
|
35
|
+
clear(): void;
|
|
36
|
+
[Symbol.iterator](): Generator<any[], void, unknown>;
|
|
37
|
+
#private;
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class BaseSVGFactory {
|
|
2
|
+
create(width: any, height: any, skipDimensions?: boolean): void;
|
|
3
|
+
createElement(type: any): void;
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
*/
|
|
7
|
+
_createSVG(type: any): void;
|
|
8
|
+
}
|
|
9
|
+
export class DOMSVGFactory extends BaseSVGFactory {
|
|
10
|
+
/**
|
|
11
|
+
* @ignore
|
|
12
|
+
*/
|
|
13
|
+
_createSVG(type: any): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export type PageViewport = import("./page_viewport").PageViewport;
|
|
2
|
+
export type TextContent = import("./api").TextContent;
|
|
3
|
+
export type TextLayerImages = import("./text_layer_images").TextLayerImages;
|
|
4
|
+
export type TextLayerParameters = {
|
|
5
|
+
/**
|
|
6
|
+
* - Text content to
|
|
7
|
+
* render, i.e. the value returned by the page's `streamTextContent` or
|
|
8
|
+
* `getTextContent` method.
|
|
9
|
+
*/
|
|
10
|
+
textContentSource: ReadableStream | TextContent;
|
|
11
|
+
/**
|
|
12
|
+
* - The DOM node that will contain the text
|
|
13
|
+
* runs.
|
|
14
|
+
*/
|
|
15
|
+
container: HTMLElement;
|
|
16
|
+
/**
|
|
17
|
+
* - The target viewport to properly layout
|
|
18
|
+
* the text runs.
|
|
19
|
+
*/
|
|
20
|
+
viewport: PageViewport;
|
|
21
|
+
/**
|
|
22
|
+
* - An optional TextLayerImages instance
|
|
23
|
+
* that handles right clicking on images.
|
|
24
|
+
*/
|
|
25
|
+
images?: import("./text_layer_images").TextLayerImages | undefined;
|
|
26
|
+
};
|
|
27
|
+
export type TextLayerUpdateParameters = {
|
|
28
|
+
/**
|
|
29
|
+
* - The target viewport to properly layout
|
|
30
|
+
* the text runs.
|
|
31
|
+
*/
|
|
32
|
+
viewport: PageViewport;
|
|
33
|
+
/**
|
|
34
|
+
* - Callback invoked before the textLayer is
|
|
35
|
+
* updated in the DOM.
|
|
36
|
+
*/
|
|
37
|
+
onBefore?: Function | undefined;
|
|
38
|
+
};
|
|
39
|
+
export const DEFAULT_FONT_SIZE: 30;
|
|
40
|
+
export class TextLayer {
|
|
41
|
+
static #ascentCache: Map<any, any>;
|
|
42
|
+
static #canvasContexts: Map<any, any>;
|
|
43
|
+
static #canvasCtxFonts: WeakMap<object, any>;
|
|
44
|
+
static #minFontSize: null;
|
|
45
|
+
static #pendingTextLayers: Set<any>;
|
|
46
|
+
static get fontFamilyMap(): any;
|
|
47
|
+
/**
|
|
48
|
+
* Clean-up global textLayer data.
|
|
49
|
+
* @returns {undefined}
|
|
50
|
+
*/
|
|
51
|
+
static cleanup(): undefined;
|
|
52
|
+
static #getCtx(lang?: null): any;
|
|
53
|
+
static #quantizeFontSize(size: any): number;
|
|
54
|
+
static #ensureCtxFont(ctx: any, size: any, family: any): void;
|
|
55
|
+
/**
|
|
56
|
+
* Compute the minimum font size enforced by the browser.
|
|
57
|
+
*/
|
|
58
|
+
static #ensureMinFontSizeComputed(): void;
|
|
59
|
+
static #getAscent(fontFamily: any, style: any, lang: any): any;
|
|
60
|
+
/**
|
|
61
|
+
* @param {TextLayerParameters} options
|
|
62
|
+
*/
|
|
63
|
+
constructor({ textContentSource, images, container, viewport }: TextLayerParameters);
|
|
64
|
+
/**
|
|
65
|
+
* Render the textLayer.
|
|
66
|
+
* @returns {Promise}
|
|
67
|
+
*/
|
|
68
|
+
render(): Promise<any>;
|
|
69
|
+
/**
|
|
70
|
+
* Update a previously rendered textLayer, if necessary.
|
|
71
|
+
* @param {TextLayerUpdateParameters} options
|
|
72
|
+
* @returns {undefined}
|
|
73
|
+
*/
|
|
74
|
+
update({ viewport, onBefore }: TextLayerUpdateParameters): undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Cancel rendering of the textLayer.
|
|
77
|
+
* @returns {undefined}
|
|
78
|
+
*/
|
|
79
|
+
cancel(): undefined;
|
|
80
|
+
/**
|
|
81
|
+
* @type {Array<HTMLElement>} HTML elements that correspond to the text items
|
|
82
|
+
* of the textContent input.
|
|
83
|
+
* This is output and will initially be set to an empty array.
|
|
84
|
+
*/
|
|
85
|
+
get textDivs(): Array<HTMLElement>;
|
|
86
|
+
/**
|
|
87
|
+
* @type {Array<string>} Strings that correspond to the `str` property of
|
|
88
|
+
* the text items of the textContent input.
|
|
89
|
+
* This is output and will initially be set to an empty array
|
|
90
|
+
*/
|
|
91
|
+
get textContentItemsStr(): Array<string>;
|
|
92
|
+
#private;
|
|
93
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to manage paceholder <canvas> elements that, when right-clicked on,
|
|
3
|
+
* are populated with the corresponding image extracted from the PDF page.
|
|
4
|
+
*/
|
|
5
|
+
export class TextLayerImages {
|
|
6
|
+
static #activeImage: null;
|
|
7
|
+
constructor(minSize: any, coordinates: any, viewport: any, getPageCanvas: any);
|
|
8
|
+
render(): HTMLDivElement;
|
|
9
|
+
#private;
|
|
10
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type TouchManagerOptions = {
|
|
2
|
+
container: HTMLElement | Window;
|
|
3
|
+
isPinchingDisabled?: Function | undefined;
|
|
4
|
+
isPinchingStopped?: Function | undefined;
|
|
5
|
+
onPinchStart?: Function | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* - Called with the previous client
|
|
8
|
+
* midpoint, the previous/current screen distance, and the client midpoint
|
|
9
|
+
* delta.
|
|
10
|
+
*/
|
|
11
|
+
onPinching?: Function | undefined;
|
|
12
|
+
onPinchEnd?: Function | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* - Called with the client midpoint delta
|
|
15
|
+
* when no scale update is emitted.
|
|
16
|
+
*/
|
|
17
|
+
onPanning?: Function | undefined;
|
|
18
|
+
signal: AbortSignal;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {object} TouchManagerOptions
|
|
22
|
+
* @property {HTMLElement | Window} container
|
|
23
|
+
* @property {Function} [isPinchingDisabled]
|
|
24
|
+
* @property {Function} [isPinchingStopped]
|
|
25
|
+
* @property {Function} [onPinchStart]
|
|
26
|
+
* @property {Function} [onPinching] - Called with the previous client
|
|
27
|
+
* midpoint, the previous/current screen distance, and the client midpoint
|
|
28
|
+
* delta.
|
|
29
|
+
* @property {Function} [onPinchEnd]
|
|
30
|
+
* @property {Function} [onPanning] - Called with the client midpoint delta
|
|
31
|
+
* when no scale update is emitted.
|
|
32
|
+
* @property {AbortSignal} signal
|
|
33
|
+
*/
|
|
34
|
+
export class TouchManager {
|
|
35
|
+
/**
|
|
36
|
+
* @param {TouchManagerOptions} options
|
|
37
|
+
*/
|
|
38
|
+
constructor({ container, isPinchingDisabled, isPinchingStopped, onPinchStart, onPinching, onPinchEnd, onPanning, signal, }: TouchManagerOptions);
|
|
39
|
+
/**
|
|
40
|
+
* NOTE: Don't shadow this value since `devicePixelRatio` may change if the
|
|
41
|
+
* window resolution changes, e.g. if the viewer is moved to another monitor.
|
|
42
|
+
*/
|
|
43
|
+
get MIN_TOUCH_DISTANCE_TO_PINCH(): number;
|
|
44
|
+
/**
|
|
45
|
+
* Once pinching, the span must change by at least 4 device pixels to update
|
|
46
|
+
* the scale: below that it's contact jitter (a moving finger is reported
|
|
47
|
+
* with a slight lag and its position is quantized), not an intentional
|
|
48
|
+
* pinch, hence a two-finger pan doesn't make the zoom drift.
|
|
49
|
+
*
|
|
50
|
+
* NOTE: Don't shadow this value since `devicePixelRatio` may change.
|
|
51
|
+
*/
|
|
52
|
+
get MIN_TOUCH_DISTANCE_TO_SCALE(): number;
|
|
53
|
+
destroy(): void;
|
|
54
|
+
#private;
|
|
55
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function endRequests(): void;
|
|
2
|
+
export class PDFDataTransportStream extends BasePDFStream {
|
|
3
|
+
constructor(source: any);
|
|
4
|
+
_progressiveDone: boolean;
|
|
5
|
+
_queuedChunks: any[];
|
|
6
|
+
getRangeReader(begin: any, end: any): BasePDFStreamRangeReader;
|
|
7
|
+
cancelAllRequests(reason: any): void;
|
|
8
|
+
#private;
|
|
9
|
+
}
|
|
10
|
+
import { BasePDFStream } from "../shared/base_pdf_stream.js";
|
|
11
|
+
import { BasePDFStreamRangeReader } from "../shared/base_pdf_stream.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function drawMeshWithGPU(posData: any, colData: any, vertexCount: any, context: any, backgroundColor: any, paddedWidth: any, paddedHeight: any, borderSize: any): ImageBitmap;
|
|
2
|
+
/**
|
|
3
|
+
* Start GPU initialization as early as possible.
|
|
4
|
+
* @returns {Promise<boolean>} true if a GPU device was acquired.
|
|
5
|
+
*/
|
|
6
|
+
export function initGPU(): Promise<boolean>;
|
|
7
|
+
export function isGPUReady(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Pre-compile the Gouraud-mesh WGSL pipeline.
|
|
10
|
+
*/
|
|
11
|
+
export function loadMeshShader(): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class GlobalWorkerOptions {
|
|
2
|
+
static #port: null;
|
|
3
|
+
static #src: string;
|
|
4
|
+
/**
|
|
5
|
+
* @param {Worker | null} val - Defines global port for worker process.
|
|
6
|
+
* Overrides the `workerSrc` option.
|
|
7
|
+
*/
|
|
8
|
+
static set workerPort(val: Worker | null);
|
|
9
|
+
/**
|
|
10
|
+
* @type {Worker | null}
|
|
11
|
+
*/
|
|
12
|
+
static get workerPort(): Worker | null;
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} val - A string containing the path and filename of
|
|
15
|
+
* the worker file.
|
|
16
|
+
*
|
|
17
|
+
* NOTE: The `workerSrc` option should always be set, in order to prevent
|
|
18
|
+
* any issues when using the PDF.js library.
|
|
19
|
+
*/
|
|
20
|
+
static set workerSrc(val: string);
|
|
21
|
+
/**
|
|
22
|
+
* @type {string}
|
|
23
|
+
*/
|
|
24
|
+
static get workerSrc(): string;
|
|
25
|
+
}
|