@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,52 @@
|
|
|
1
|
+
export class BaseStream {
|
|
2
|
+
/**
|
|
3
|
+
* @abstract
|
|
4
|
+
* @returns {number}
|
|
5
|
+
*/
|
|
6
|
+
get length(): number;
|
|
7
|
+
/**
|
|
8
|
+
* @abstract
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
get isEmpty(): boolean;
|
|
12
|
+
get isDataLoaded(): any;
|
|
13
|
+
getByte(): void;
|
|
14
|
+
/**
|
|
15
|
+
* @abstract
|
|
16
|
+
* @param {number | undefined} [length]
|
|
17
|
+
* @returns {Uint8Array}
|
|
18
|
+
*/
|
|
19
|
+
getBytes(length?: number | undefined): Uint8Array;
|
|
20
|
+
/**
|
|
21
|
+
* NOTE: This method can only be used to get image-data that is guaranteed
|
|
22
|
+
* to be fully loaded, since otherwise intermittent errors may occur;
|
|
23
|
+
* note the `ObjectLoader` class.
|
|
24
|
+
*/
|
|
25
|
+
getImageData(length: any, decoderOptions: any): Promise<Uint8Array<ArrayBufferLike>>;
|
|
26
|
+
asyncGetBytes(): Promise<void>;
|
|
27
|
+
get isAsync(): boolean;
|
|
28
|
+
get isAsyncDecoder(): boolean;
|
|
29
|
+
get isImageStream(): boolean;
|
|
30
|
+
get canAsyncDecodeImageFromBuffer(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* @param {number} width - The width from the image dictionary.
|
|
33
|
+
* @param {number} height - The height from the image dictionary.
|
|
34
|
+
*/
|
|
35
|
+
getTransferableImage(width: number, height: number): Promise<null>;
|
|
36
|
+
peekByte(): void;
|
|
37
|
+
peekBytes(length: any): Uint8Array<ArrayBufferLike>;
|
|
38
|
+
getUint16(): any;
|
|
39
|
+
getInt32(): any;
|
|
40
|
+
getByteRange(begin: any, end: any): void;
|
|
41
|
+
getString(length: any): string;
|
|
42
|
+
skip(n: any): void;
|
|
43
|
+
reset(): void;
|
|
44
|
+
moveStart(): void;
|
|
45
|
+
makeSubStream(start: any, length: any, dict?: null): void;
|
|
46
|
+
clone(): void;
|
|
47
|
+
/**
|
|
48
|
+
* @returns {Array | null}
|
|
49
|
+
*/
|
|
50
|
+
getBaseStreams(): any[] | null;
|
|
51
|
+
getOriginalStream(): any;
|
|
52
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class BrotliStream extends DecodeStream {
|
|
2
|
+
constructor(stream: any, maybeLength: any);
|
|
3
|
+
stream: any;
|
|
4
|
+
dict: any;
|
|
5
|
+
getImageData(length: any, _decoderOptions: any): Promise<Uint8Array<ArrayBuffer>>;
|
|
6
|
+
asyncGetBytes(): Promise<Uint8Array<ArrayBuffer> | null>;
|
|
7
|
+
#private;
|
|
8
|
+
}
|
|
9
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function calculateMD5(data: any, offset: any, length: any): Uint8Array<ArrayBuffer>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function calculateSHA256(data: any, offset: any, length: any): Uint8Array<ArrayBuffer>;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Callback used to lazily fetch attachment content.
|
|
3
|
+
*/
|
|
4
|
+
export type GetAttachmentContent = (id: string) => CatalogAttachmentContent;
|
|
5
|
+
/**
|
|
6
|
+
* Attachment value.
|
|
7
|
+
*/
|
|
8
|
+
export type CatalogAttachmentContent = Uint8Array | null;
|
|
9
|
+
/**
|
|
10
|
+
* Attachment metadata.
|
|
11
|
+
*/
|
|
12
|
+
export type CatalogAttachment = {
|
|
13
|
+
/**
|
|
14
|
+
* Value, when already available.
|
|
15
|
+
*/
|
|
16
|
+
content?: CatalogAttachmentContent | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Description.
|
|
19
|
+
*/
|
|
20
|
+
description: string;
|
|
21
|
+
/**
|
|
22
|
+
* Filename (just the basename) for display.
|
|
23
|
+
*/
|
|
24
|
+
filename: string;
|
|
25
|
+
/**
|
|
26
|
+
* File path.
|
|
27
|
+
*/
|
|
28
|
+
rawFilename: string;
|
|
29
|
+
};
|
|
30
|
+
export class Catalog {
|
|
31
|
+
/**
|
|
32
|
+
* @typedef {object} ParseDestDictionaryParameters
|
|
33
|
+
* @property {Dict} destDict - The dictionary containing the destination.
|
|
34
|
+
* @property {object} resultObj - The object where the parsed destination
|
|
35
|
+
* properties will be placed.
|
|
36
|
+
* @property {string} [docBaseUrl] - The document base URL that is used when
|
|
37
|
+
* attempting to recover valid absolute URLs from relative ones.
|
|
38
|
+
* @property {Record<string, CatalogAttachment> | null} [docAttachments] - The
|
|
39
|
+
* document attachments (may not exist in most PDF documents).
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Derive a destination array from a Structure Element reference.
|
|
43
|
+
* Walks the SE dict to find its page (Pg) and optional bounding box (A.BBox),
|
|
44
|
+
* then returns an XYZ destination array that can be used for navigation.
|
|
45
|
+
* @param {XRef} xref
|
|
46
|
+
* @param {Ref} seRef
|
|
47
|
+
* @returns {Array|null}
|
|
48
|
+
*/
|
|
49
|
+
static #getDestFromStructElement(xref: XRef, seRef: Ref): any[] | null;
|
|
50
|
+
/**
|
|
51
|
+
* Helper function used to parse the contents of destination dictionaries.
|
|
52
|
+
* @param {ParseDestDictionaryParameters} params
|
|
53
|
+
*/
|
|
54
|
+
static parseDestDictionary({ destDict, resultObj, docBaseUrl, docAttachments, }: {
|
|
55
|
+
/**
|
|
56
|
+
* - The dictionary containing the destination.
|
|
57
|
+
*/
|
|
58
|
+
destDict: Dict;
|
|
59
|
+
/**
|
|
60
|
+
* - The object where the parsed destination
|
|
61
|
+
* properties will be placed.
|
|
62
|
+
*/
|
|
63
|
+
resultObj: object;
|
|
64
|
+
/**
|
|
65
|
+
* - The document base URL that is used when
|
|
66
|
+
* attempting to recover valid absolute URLs from relative ones.
|
|
67
|
+
*/
|
|
68
|
+
docBaseUrl?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* - The
|
|
71
|
+
* document attachments (may not exist in most PDF documents).
|
|
72
|
+
*/
|
|
73
|
+
docAttachments?: Record<string, CatalogAttachment> | null | undefined;
|
|
74
|
+
}): void;
|
|
75
|
+
constructor(pdfManager: any, xref: any);
|
|
76
|
+
builtInCMapCache: Map<any, any>;
|
|
77
|
+
fontCache: RefMap;
|
|
78
|
+
globalColorSpaceCache: GlobalColorSpaceCache;
|
|
79
|
+
globalImageCache: GlobalImageCache;
|
|
80
|
+
nonBlendModesSet: RefSet;
|
|
81
|
+
pageDictCache: RefMap;
|
|
82
|
+
pageIndexCache: RefMap;
|
|
83
|
+
pageKidsCountCache: RefMap;
|
|
84
|
+
standardFontDataCache: Map<any, any>;
|
|
85
|
+
systemFontCache: Map<any, any>;
|
|
86
|
+
pdfManager: any;
|
|
87
|
+
xref: any;
|
|
88
|
+
cloneDict(): any;
|
|
89
|
+
/**
|
|
90
|
+
* Create an id for an attachment from a FileAttachment annotation.
|
|
91
|
+
*
|
|
92
|
+
* The id is registered here rather than parsed from a public string prefix in
|
|
93
|
+
* `attachmentContent`, since catalog attachment names can be arbitrary PDF
|
|
94
|
+
* strings and may otherwise collide with annotation-local ids.
|
|
95
|
+
* @param {Ref} ref
|
|
96
|
+
* File-spec or embedded-file stream reference.
|
|
97
|
+
* @param {boolean} [isSound]
|
|
98
|
+
* When set, the referenced stream holds raw PDF sound samples that
|
|
99
|
+
* `attachmentContent` wraps in a WAV container on fetch.
|
|
100
|
+
* @returns {string}
|
|
101
|
+
* Attachment id.
|
|
102
|
+
*/
|
|
103
|
+
getAttachmentIdForAnnotation(ref: Ref, isSound?: boolean): string;
|
|
104
|
+
get version(): any;
|
|
105
|
+
get lang(): any;
|
|
106
|
+
/**
|
|
107
|
+
* @type {boolean} `true` for pure XFA documents,
|
|
108
|
+
* `false` for XFA Foreground documents.
|
|
109
|
+
*/
|
|
110
|
+
get needsRendering(): boolean;
|
|
111
|
+
get collection(): any;
|
|
112
|
+
get acroForm(): any;
|
|
113
|
+
get acroFormRef(): any;
|
|
114
|
+
get metadata(): any;
|
|
115
|
+
get markInfo(): any;
|
|
116
|
+
get hasStructTree(): any;
|
|
117
|
+
get structTreeRoot(): any;
|
|
118
|
+
get toplevelPagesDict(): any;
|
|
119
|
+
get documentOutline(): any;
|
|
120
|
+
get documentOutlineForEditor(): any;
|
|
121
|
+
get permissions(): any;
|
|
122
|
+
get optionalContentConfig(): any;
|
|
123
|
+
setActualNumPages(num?: null): void;
|
|
124
|
+
get hasActualNumPages(): boolean;
|
|
125
|
+
get _pagesCount(): any;
|
|
126
|
+
get numPages(): any;
|
|
127
|
+
get destinations(): any;
|
|
128
|
+
getDestination(id: any): any;
|
|
129
|
+
get rawPageLabels(): Map<any, any> | null;
|
|
130
|
+
get pageLabels(): any;
|
|
131
|
+
get pageLayout(): any;
|
|
132
|
+
get pageMode(): any;
|
|
133
|
+
get viewerPreferences(): any;
|
|
134
|
+
get openAction(): any;
|
|
135
|
+
/**
|
|
136
|
+
* Get attachments.
|
|
137
|
+
* @returns {Map<string, CatalogAttachment> | null}
|
|
138
|
+
* Attachments.
|
|
139
|
+
*/
|
|
140
|
+
get attachments(): Map<string, CatalogAttachment> | null;
|
|
141
|
+
/**
|
|
142
|
+
* Get content for an attachment.
|
|
143
|
+
* @param {string} id
|
|
144
|
+
* Unique attachment identifier (required).
|
|
145
|
+
* @returns {CatalogAttachmentContent}
|
|
146
|
+
* Content.
|
|
147
|
+
*/
|
|
148
|
+
attachmentContent(id: string): CatalogAttachmentContent;
|
|
149
|
+
get rawEmbeddedFiles(): Map<any, any> | null;
|
|
150
|
+
get xfaImages(): any;
|
|
151
|
+
get jsActions(): any;
|
|
152
|
+
cleanup(manuallyTriggered?: boolean): Promise<void>;
|
|
153
|
+
getPageDict(pageIndex: any): Promise<(Dict | Ref)[] | (Dict | null)[]>;
|
|
154
|
+
/**
|
|
155
|
+
* Eagerly fetches the entire /Pages-tree; should ONLY be used as a fallback.
|
|
156
|
+
* @returns {Promise<Map>}
|
|
157
|
+
*/
|
|
158
|
+
getAllPageDicts(recoveryMode?: boolean): Promise<Map<any, any>>;
|
|
159
|
+
getPageIndex(pageRef: any): Promise<any>;
|
|
160
|
+
get baseUrl(): any;
|
|
161
|
+
#private;
|
|
162
|
+
}
|
|
163
|
+
import { RefMap } from "./primitives.js";
|
|
164
|
+
import { GlobalColorSpaceCache } from "./image_utils.js";
|
|
165
|
+
import { GlobalImageCache } from "./image_utils.js";
|
|
166
|
+
import { RefSet } from "./primitives.js";
|
|
167
|
+
import { Ref } from "./primitives.js";
|
|
168
|
+
import { Dict } from "./primitives.js";
|
|
169
|
+
import type { XRef } from "./xref.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class CCITTFaxStream extends DecodeStream {
|
|
2
|
+
constructor(str: any, maybeLength: any, params: any);
|
|
3
|
+
stream: any;
|
|
4
|
+
maybeLength: any;
|
|
5
|
+
dict: any;
|
|
6
|
+
params: {
|
|
7
|
+
K: any;
|
|
8
|
+
EndOfLine: boolean;
|
|
9
|
+
EncodedByteAlign: boolean;
|
|
10
|
+
Columns: any;
|
|
11
|
+
Rows: any;
|
|
12
|
+
EndOfBlock: boolean;
|
|
13
|
+
BlackIs1: boolean;
|
|
14
|
+
};
|
|
15
|
+
get bytes(): any;
|
|
16
|
+
decodeImage(bytes: any, length: any, _decoderOptions: any): Promise<Uint8Array<ArrayBuffer>>;
|
|
17
|
+
}
|
|
18
|
+
import { DecodeStream } from "./decode_stream.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function clearGlobalCaches(): void;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alternate color space handles both Separation and DeviceN color spaces. A
|
|
3
|
+
* Separation color space is actually just a DeviceN with one color component.
|
|
4
|
+
* Both color spaces use a tinting function to convert colors to a base color
|
|
5
|
+
* space.
|
|
6
|
+
*
|
|
7
|
+
* The default color is `new Float32Array(new Array(numComps).fill(1))`.
|
|
8
|
+
*/
|
|
9
|
+
export class AlternateCS extends ColorSpace {
|
|
10
|
+
constructor(numComps: any, base: any, tintFn: any);
|
|
11
|
+
base: any;
|
|
12
|
+
tintFn: any;
|
|
13
|
+
tmpBuf: Float32Array<any>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CalGrayCS: Based on "PDF Reference, Sixth Ed", p.245
|
|
17
|
+
*
|
|
18
|
+
* The default color is `new Float32Array([0])`.
|
|
19
|
+
*/
|
|
20
|
+
export class CalGrayCS extends ColorSpace {
|
|
21
|
+
constructor(whitePoint: any, blackPoint: any, gamma: any);
|
|
22
|
+
G: any;
|
|
23
|
+
XB: any;
|
|
24
|
+
YB: any;
|
|
25
|
+
ZB: any;
|
|
26
|
+
#private;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CalRGBCS: Based on "PDF Reference, Sixth Ed", p.247
|
|
30
|
+
*
|
|
31
|
+
* The default color is `new Float32Array([0, 0, 0])`.
|
|
32
|
+
*/
|
|
33
|
+
export class CalRGBCS extends ColorSpace {
|
|
34
|
+
static #BRADFORD_SCALE_MATRIX: Float32Array<ArrayBuffer>;
|
|
35
|
+
static #BRADFORD_SCALE_INVERSE_MATRIX: Float32Array<ArrayBuffer>;
|
|
36
|
+
static #SRGB_D65_XYZ_TO_RGB_MATRIX: Float32Array<ArrayBuffer>;
|
|
37
|
+
static #FLAT_WHITEPOINT_MATRIX: Float32Array<ArrayBuffer>;
|
|
38
|
+
static #tempNormalizeMatrix: Float32Array<ArrayBuffer>;
|
|
39
|
+
static #tempConvertMatrix1: Float32Array<ArrayBuffer>;
|
|
40
|
+
static #tempConvertMatrix2: Float32Array<ArrayBuffer>;
|
|
41
|
+
static #DECODE_L_CONSTANT: number;
|
|
42
|
+
constructor(whitePoint: any, blackPoint: any, gamma: any, matrix: any);
|
|
43
|
+
whitePoint: any;
|
|
44
|
+
blackPoint: any;
|
|
45
|
+
GR: any;
|
|
46
|
+
GG: any;
|
|
47
|
+
GB: any;
|
|
48
|
+
#private;
|
|
49
|
+
}
|
|
50
|
+
export class ColorSpace {
|
|
51
|
+
static #rgbBuf: Uint8ClampedArray<ArrayBuffer>;
|
|
52
|
+
/**
|
|
53
|
+
* Checks if a decode map matches the default decode map for a color space.
|
|
54
|
+
* This handles the general decode maps where there are two values per
|
|
55
|
+
* component, e.g. [0, 1, 0, 1, 0, 1] for a RGB color.
|
|
56
|
+
* This does not handle Lab, Indexed, or Pattern decode maps since they are
|
|
57
|
+
* slightly different.
|
|
58
|
+
* @param {Array} decode - Decode map (usually from an image).
|
|
59
|
+
* @param {number} numComps - Number of components the color space has.
|
|
60
|
+
*/
|
|
61
|
+
static isDefaultDecode(decode: any[], numComps: number): boolean;
|
|
62
|
+
constructor(name: any, numComps: any);
|
|
63
|
+
name: any;
|
|
64
|
+
numComps: any;
|
|
65
|
+
/**
|
|
66
|
+
* Converts the color value to the RGB color. The color components are
|
|
67
|
+
* located in the src array starting from the srcOffset. Returns the array
|
|
68
|
+
* of the rgb components, each value ranging from [0,255].
|
|
69
|
+
*/
|
|
70
|
+
getRgb(src: any, srcOffset: any, output?: Uint8ClampedArray<ArrayBuffer>): Uint8ClampedArray<ArrayBuffer>;
|
|
71
|
+
getRgbHex(src: any, srcOffset: any): string;
|
|
72
|
+
/**
|
|
73
|
+
* Converts the color value to the RGB color, similar to the getRgb method.
|
|
74
|
+
* The result placed into the dest array starting from the destOffset.
|
|
75
|
+
*/
|
|
76
|
+
getRgbItem(src: any, srcOffset: any, dest: any, destOffset: any): void;
|
|
77
|
+
/**
|
|
78
|
+
* Converts the specified number of the color values to the RGB colors.
|
|
79
|
+
* The colors are located in the src array starting from the srcOffset.
|
|
80
|
+
* The result is placed into the dest array starting from the destOffset.
|
|
81
|
+
* The src array items shall be in [0,2^bits) range, the dest array items
|
|
82
|
+
* will be in [0,255] range. alpha01 indicates how many alpha components
|
|
83
|
+
* there are in the dest array; it will be either 0 (RGB array) or 1 (RGBA
|
|
84
|
+
* array).
|
|
85
|
+
*/
|
|
86
|
+
getRgbBuffer(src: any, srcOffset: any, count: any, dest: any, destOffset: any, bits: any, alpha01: any): void;
|
|
87
|
+
/**
|
|
88
|
+
* Converts `count` unscaled colors to RGB, starting at `destOffset`.
|
|
89
|
+
* Components use the native color-space ranges expected by `getRgbItem`,
|
|
90
|
+
* and each output has a `3 + alpha01` byte stride.
|
|
91
|
+
* Subclasses may override this to batch expensive conversions.
|
|
92
|
+
*/
|
|
93
|
+
getRgbItems(src: any, count: any, dest: any, destOffset: any, alpha01: any): void;
|
|
94
|
+
/**
|
|
95
|
+
* Returns true if source data will be equal the result/output data.
|
|
96
|
+
*/
|
|
97
|
+
isPassthrough(bits: any): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Refer to the static `ColorSpace.isDefaultDecode` method below.
|
|
100
|
+
*/
|
|
101
|
+
isDefaultDecode(decode: any, bpc: any): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Fills in the RGB colors in the destination buffer. alpha01 indicates
|
|
104
|
+
* how many alpha components there are in the dest array; it will be either
|
|
105
|
+
* 0 (RGB array) or 1 (RGBA array).
|
|
106
|
+
*/
|
|
107
|
+
fillRgb(dest: any, originalWidth: any, originalHeight: any, width: any, height: any, actualHeight: any, bpc: any, comps: any, alpha01: any): void;
|
|
108
|
+
/**
|
|
109
|
+
* True if the colorspace has components in the default range of [0, 1].
|
|
110
|
+
* This should be true for all colorspaces except for lab color spaces
|
|
111
|
+
* which are [0,100], [-128, 127], [-128, 127].
|
|
112
|
+
*/
|
|
113
|
+
get usesZeroToOneRange(): any;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The default color is `new Float32Array([0, 0, 0, 1])`.
|
|
117
|
+
*/
|
|
118
|
+
export class DeviceCmykCS extends ColorSpace {
|
|
119
|
+
constructor();
|
|
120
|
+
#private;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The default color is `new Float32Array([0])`.
|
|
124
|
+
*/
|
|
125
|
+
export class DeviceGrayCS extends ColorSpace {
|
|
126
|
+
constructor();
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The default color is `new Float32Array([0, 0, 0, 1])`.
|
|
130
|
+
*/
|
|
131
|
+
export class DeviceRgbaCS extends ColorSpace {
|
|
132
|
+
constructor();
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The default color is `new Float32Array([0, 0, 0])`.
|
|
136
|
+
*/
|
|
137
|
+
export class DeviceRgbCS extends ColorSpace {
|
|
138
|
+
constructor();
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The default color is `new Uint8Array([0])`.
|
|
142
|
+
*/
|
|
143
|
+
export class IndexedCS extends ColorSpace {
|
|
144
|
+
constructor(base: any, highVal: any, lookup: any);
|
|
145
|
+
highVal: any;
|
|
146
|
+
#private;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* LabCS: Based on "PDF Reference, Sixth Ed", p.250
|
|
150
|
+
*
|
|
151
|
+
* The default color is `new Float32Array([0, 0, 0])`.
|
|
152
|
+
*/
|
|
153
|
+
export class LabCS extends ColorSpace {
|
|
154
|
+
constructor(whitePoint: any, blackPoint: any, range: any);
|
|
155
|
+
XB: any;
|
|
156
|
+
YB: any;
|
|
157
|
+
ZB: any;
|
|
158
|
+
amin: any;
|
|
159
|
+
amax: any;
|
|
160
|
+
bmin: any;
|
|
161
|
+
bmax: any;
|
|
162
|
+
#private;
|
|
163
|
+
}
|
|
164
|
+
export class PatternCS extends ColorSpace {
|
|
165
|
+
constructor(baseCS: any);
|
|
166
|
+
base: any;
|
|
167
|
+
isDefaultDecode(decode: any, bpc: any): void;
|
|
168
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class ColorSpaceUtils {
|
|
2
|
+
static parse({ cs, xref, resources, pdfFunctionFactory, globalColorSpaceCache, localColorSpaceCache, asyncIfNotCached, }: {
|
|
3
|
+
cs: any;
|
|
4
|
+
xref: any;
|
|
5
|
+
resources?: null | undefined;
|
|
6
|
+
pdfFunctionFactory: any;
|
|
7
|
+
globalColorSpaceCache: any;
|
|
8
|
+
localColorSpaceCache: any;
|
|
9
|
+
asyncIfNotCached?: boolean | undefined;
|
|
10
|
+
}): any;
|
|
11
|
+
/**
|
|
12
|
+
* NOTE: This method should *only* be invoked from `this.#parse`,
|
|
13
|
+
* when parsing "sub" ColorSpaces.
|
|
14
|
+
*/
|
|
15
|
+
static #subParse(cs: any, options: any): any;
|
|
16
|
+
static #parse(cs: any, options: any): any;
|
|
17
|
+
static get gray(): any;
|
|
18
|
+
static get rgb(): any;
|
|
19
|
+
static get rgba(): any;
|
|
20
|
+
static get cmyk(): any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Combines multiple ArrayBuffers into a single Uint8Array.
|
|
3
|
+
* @param {Array<ArrayBuffer>} arr - An array of ArrayBuffers.
|
|
4
|
+
* @returns {Uint8Array}
|
|
5
|
+
*/
|
|
6
|
+
export function arrayBuffersToBytes(arr: Array<ArrayBuffer>): Uint8Array;
|
|
7
|
+
export function codePointIter(str: any): Generator<any, void, unknown>;
|
|
8
|
+
export function collectActions(xref: any, dict: any, eventType: any): Map<any, any> | null;
|
|
9
|
+
export function deepCompare(a: any, b: any): boolean;
|
|
10
|
+
export function encodeToXmlString(str: any): any;
|
|
11
|
+
export function escapePDFName(str: any): any;
|
|
12
|
+
export function escapeString(str: any): any;
|
|
13
|
+
export function fetchBinaryData(url: any): Promise<Uint8Array<ArrayBuffer>>;
|
|
14
|
+
/**
|
|
15
|
+
* Get the value of an inheritable property.
|
|
16
|
+
*
|
|
17
|
+
* If the PDF specification explicitly lists a property in a dictionary as
|
|
18
|
+
* inheritable, then the value of the property may be present in the dictionary
|
|
19
|
+
* itself or in one or more parents of the dictionary.
|
|
20
|
+
*
|
|
21
|
+
* If the key is not found in the tree, `undefined` is returned. Otherwise,
|
|
22
|
+
* the value for the key is returned or, if `stopWhenFound` is `false`, a list
|
|
23
|
+
* of values is returned.
|
|
24
|
+
* @param {object} params
|
|
25
|
+
* @param {Dict} params.dict - Dictionary from where to start the traversal.
|
|
26
|
+
* @param {string} params.key - The key of the property to find the value for.
|
|
27
|
+
* @param {boolean} params.getArray - Whether or not the value should be fetched
|
|
28
|
+
* as an array. The default value is `false`.
|
|
29
|
+
* @param {boolean} params.stopWhenFound - Whether or not to stop the traversal
|
|
30
|
+
* when the key is found. If set to `false`, we always walk up the entire
|
|
31
|
+
* parent chain, for example to be able to find `\Resources` placed on
|
|
32
|
+
* multiple levels of the tree. The default value is `true`.
|
|
33
|
+
*/
|
|
34
|
+
export function getInheritableProperty({ dict, key, getArray, stopWhenFound, }: {
|
|
35
|
+
dict: Dict;
|
|
36
|
+
key: string;
|
|
37
|
+
getArray: boolean;
|
|
38
|
+
stopWhenFound: boolean;
|
|
39
|
+
}): any;
|
|
40
|
+
export function getLookupTableFactory(initializer: any, useArray?: boolean): () => any;
|
|
41
|
+
export function getModificationDate(date?: Date): string;
|
|
42
|
+
export function getNewAnnotationsMap(annotationStorage: any): Map<any, any> | null;
|
|
43
|
+
/**
|
|
44
|
+
* Get the parent dictionary to update when a property is set.
|
|
45
|
+
* @param {Dict} dict - Dictionary from where to start the traversal.
|
|
46
|
+
* @param {Ref} ref - The reference to the dictionary.
|
|
47
|
+
* @param {XRef} xref - The `XRef` instance.
|
|
48
|
+
*/
|
|
49
|
+
export function getParentToUpdate(dict: Dict, ref: Ref, xref: XRef): {
|
|
50
|
+
dict: null;
|
|
51
|
+
ref: null;
|
|
52
|
+
};
|
|
53
|
+
export function getRotationMatrix(rotation: any, width: any, height: any): any[];
|
|
54
|
+
/**
|
|
55
|
+
* Get the number of bytes to use to represent the given positive integer.
|
|
56
|
+
* If n is zero, the function returns 0 which means that we don't need to waste
|
|
57
|
+
* a byte to represent it.
|
|
58
|
+
* @param {number} x - a positive integer.
|
|
59
|
+
* @returns {number}
|
|
60
|
+
*/
|
|
61
|
+
export function getSizeInBytes(x: number): number;
|
|
62
|
+
export const IDENTITY_MATRIX: number[];
|
|
63
|
+
/**
|
|
64
|
+
* Checks if something is an Array containing only boolean values,
|
|
65
|
+
* and (optionally) checks its length.
|
|
66
|
+
* @param {any} arr
|
|
67
|
+
* @param {number | null} len
|
|
68
|
+
* @returns {boolean}
|
|
69
|
+
*/
|
|
70
|
+
export function isBooleanArray(arr: any, len: number | null): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Checks if something is an Array containing only numbers,
|
|
73
|
+
* and (optionally) checks its length.
|
|
74
|
+
* @param {any} arr
|
|
75
|
+
* @param {number | null} len
|
|
76
|
+
* @returns {boolean}
|
|
77
|
+
*/
|
|
78
|
+
export function isNumberArray(arr: any, len: number | null): boolean;
|
|
79
|
+
export function isWhiteSpace(ch: any): boolean;
|
|
80
|
+
export function lookupMatrix(arr: any, fallback: any): any;
|
|
81
|
+
export function lookupNormalRect(arr: any, fallback: any): any;
|
|
82
|
+
export function lookupRect(arr: any, fallback: any): any;
|
|
83
|
+
export const MAX_INT_32: number;
|
|
84
|
+
declare const MissingDataException_base: any;
|
|
85
|
+
export class MissingDataException extends MissingDataException_base {
|
|
86
|
+
[x: string]: any;
|
|
87
|
+
constructor(begin: any, end: any);
|
|
88
|
+
begin: any;
|
|
89
|
+
end: any;
|
|
90
|
+
}
|
|
91
|
+
export function normalizeCSSFontFamily(fontFamily: any): any;
|
|
92
|
+
export function numberToString(value: any): any;
|
|
93
|
+
declare const ParserEOFException_base: any;
|
|
94
|
+
export class ParserEOFException extends ParserEOFException_base {
|
|
95
|
+
[x: string]: any;
|
|
96
|
+
constructor(msg: any);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* AcroForm field names use an array like notation to refer to
|
|
100
|
+
* repeated XFA elements e.g. foo.bar[nnn].
|
|
101
|
+
* see: XFA Spec Chapter 3 - Repeated Elements
|
|
102
|
+
* @param {string} path - XFA path name.
|
|
103
|
+
* @returns {Array} - Array of Objects with the name and pos of
|
|
104
|
+
* each part of the path.
|
|
105
|
+
*/
|
|
106
|
+
export function parseXFAPath(path: string): any[];
|
|
107
|
+
export const PDF_VERSION_REGEXP: RegExp;
|
|
108
|
+
export function recoverJsURL(str: any): {
|
|
109
|
+
url: string;
|
|
110
|
+
newWindow: boolean;
|
|
111
|
+
} | null;
|
|
112
|
+
export const RESOURCES_KEYS_OPERATOR_LIST: string[];
|
|
113
|
+
export const RESOURCES_KEYS_TEXT_CONTENT: string[];
|
|
114
|
+
/**
|
|
115
|
+
* Converts positive integers to (upper case) Roman numerals.
|
|
116
|
+
* @param {number} number - The number that should be converted.
|
|
117
|
+
* @param {boolean} lowerCase - Indicates if the result should be converted
|
|
118
|
+
* to lower case letters. The default value is `false`.
|
|
119
|
+
* @returns {string} The resulting Roman number.
|
|
120
|
+
*/
|
|
121
|
+
export function toRomanNumerals(number: number, lowerCase?: boolean): string;
|
|
122
|
+
export function validateCSSFont(cssFontInfo: any): boolean;
|
|
123
|
+
export function validateFontName(fontFamily: any, mustWarn?: boolean): boolean;
|
|
124
|
+
declare const XRefEntryException_base: any;
|
|
125
|
+
export class XRefEntryException extends XRefEntryException_base {
|
|
126
|
+
[x: string]: any;
|
|
127
|
+
constructor(msg: any);
|
|
128
|
+
}
|
|
129
|
+
declare const XRefParseException_base: any;
|
|
130
|
+
export class XRefParseException extends XRefParseException_base {
|
|
131
|
+
[x: string]: any;
|
|
132
|
+
constructor(msg: any);
|
|
133
|
+
}
|
|
134
|
+
import { Dict } from "./primitives.js";
|
|
135
|
+
import { Ref } from "./primitives.js";
|
|
136
|
+
export {};
|