mol-pdf 1.0.0
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/LICENSE +21 -0
- package/README.md +168 -0
- package/lib/cafe-pdf/index.js +7 -0
- package/lib/cafe-pdf/src/CMapReaderFactory.js +18 -0
- package/lib/cafe-pdf/src/index.vue +350 -0
- package/lib/cafe-pdf/src/pdfjs-dist/CODE_OF_CONDUCT.md +15 -0
- package/lib/cafe-pdf/src/pdfjs-dist/LICENSE +177 -0
- package/lib/cafe-pdf/src/pdfjs-dist/README.md +10 -0
- package/lib/cafe-pdf/src/pdfjs-dist/bower.json +14 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.js +24893 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.js.map +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.min.js +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.worker.entry.js +17 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.worker.js +56524 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.worker.js.map +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/build/pdf.worker.min.js +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Add-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Add-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/B5pc-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/B5pc-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/CNS-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/CNS-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/CNS1-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/CNS1-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/CNS2-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/CNS2-V.bcmap +3 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/ETHK-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/ETHK-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/ETen-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/ETen-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/ETenms-B5-H.bcmap +3 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/ETenms-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Ext-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Ext-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GB-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GB-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GB-H.bcmap +4 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GB-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBK-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBK-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBK2K-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBK2K-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBT-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBT-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBT-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBT-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKdla-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKdla-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKm314-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKm314-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKm471-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKm471-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKscs-B5-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/HKscs-B5-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Hankaku.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Hiragana.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSC-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSC-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSC-Johab-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSC-Johab-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Katakana.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/LICENSE +36 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/NWP-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/NWP-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/RKSJ-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/RKSJ-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/Roman.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/V.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/cmaps/WP-Symbol.bcmap +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/image_decoders/pdf.image_decoders.js +11500 -0
- package/lib/cafe-pdf/src/pdfjs-dist/image_decoders/pdf.image_decoders.js.map +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/image_decoders/pdf.image_decoders.min.js +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/annotation.js +1481 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/arithmetic_decoder.js +385 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/bidi.js +319 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/ccitt.js +713 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/ccitt_stream.js +81 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/cff_parser.js +1815 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/charsets.js +33 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/chunked_stream.js +756 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/cmap.js +971 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/colorspace.js +1225 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/core_utils.js +173 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/crypto.js +1663 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/document.js +869 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/encodings.js +69 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/evaluator.js +3482 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/font_renderer.js +1024 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/fonts.js +3188 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/function.js +1362 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/glyphlist.js +4556 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/image.js +686 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/image_utils.js +111 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/jbig2.js +2231 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/jbig2_stream.js +98 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/jpeg_stream.js +127 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/jpg.js +1236 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/jpx.js +2350 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/jpx_stream.js +102 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/metrics.js +2969 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/murmurhash3.js +156 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/obj.js +2453 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/operator_list.js +659 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/parser.js +1353 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/pattern.js +954 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/pdf_manager.js +389 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/primitives.js +361 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/ps_parser.js +308 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/standard_fonts.js +758 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/stream.js +1311 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/type1_parser.js +716 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/unicode.js +1899 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/worker.js +599 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/core/worker_stream.js +277 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/annotation_layer.js +1470 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/api.js +2595 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/api_compatibility.js +45 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/canvas.js +2087 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/content_disposition.js +222 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/display_utils.js +777 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/fetch_stream.js +425 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/font_loader.js +545 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/metadata.js +155 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/network.js +707 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/network_utils.js +106 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/node_stream.js +666 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/pattern_helper.js +464 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/svg.js +1779 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/text_layer.js +705 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/transport_stream.js +508 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/webgl.js +475 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/worker_options.js +31 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/display/xml_parser.js +547 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/examples/node/domstubs.js +302 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/pdf.js +103 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/pdf.worker.js +29 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/shared/compatibility.js +273 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/shared/global_scope.js +24 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/shared/is_node.js +28 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/shared/message_handler.js +488 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/shared/streams_polyfill.js +43 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/shared/util.js +973 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/annotation_spec.js +2163 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/api_spec.js +1540 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/bidi_spec.js +41 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/cff_parser_spec.js +321 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/clitests_helper.js +41 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/cmap_spec.js +359 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/colorspace_spec.js +342 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/core_utils_spec.js +191 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/crypto_spec.js +537 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/custom_spec.js +110 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/display_svg_spec.js +161 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/display_utils_spec.js +273 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/document_spec.js +42 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/encodings_spec.js +67 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/evaluator_spec.js +336 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/fetch_stream_spec.js +111 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/function_spec.js +643 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/jasmine-boot.js +139 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/message_handler_spec.js +355 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/metadata_spec.js +118 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/murmurhash3_spec.js +71 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/network_spec.js +120 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/network_utils_spec.js +349 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/node_stream_spec.js +243 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/parser_spec.js +246 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/pdf_find_controller_spec.js +230 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/pdf_find_utils_spec.js +63 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/pdf_history_spec.js +95 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/primitives_spec.js +331 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/stream_spec.js +76 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/test_utils.js +383 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/testreporter.js +102 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/type1_parser_spec.js +104 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/ui_utils_spec.js +819 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/unicode_spec.js +121 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/test/unit/util_spec.js +262 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/annotation_layer_builder.js +163 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/app.js +2453 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/app_options.js +273 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/base_viewer.js +1173 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/chromecom.js +477 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/debugger.js +726 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/download_manager.js +119 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/firefox_print_service.js +114 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/firefoxcom.js +562 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/genericcom.js +151 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/genericl10n.js +194 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/grab_to_pan.js +180 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/interfaces.js +303 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/overlay_manager.js +302 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/password_prompt.js +120 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_attachment_viewer.js +189 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_cursor_tools.js +166 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_document_properties.js +464 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_find_bar.js +260 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_find_controller.js +753 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_find_utils.js +111 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_history.js +612 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_link_service.js +502 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_outline_viewer.js +276 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_page_view.js +671 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_presentation_mode.js +473 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_print_service.js +328 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_rendering_queue.js +172 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_sidebar.js +437 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_sidebar_resizer.js +191 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_single_page_viewer.js +186 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_thumbnail_view.js +446 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_thumbnail_viewer.js +292 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_viewer.component.js +148 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/pdf_viewer.js +162 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/preferences.js +369 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/secondary_toolbar.js +365 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/text_layer_builder.js +434 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/toolbar.js +280 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/ui_utils.js +903 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/view_history.js +285 -0
- package/lib/cafe-pdf/src/pdfjs-dist/lib/web/viewer_compatibility.js +36 -0
- package/lib/cafe-pdf/src/pdfjs-dist/package.json +33 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-check.svg +11 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-comment.svg +16 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-help.svg +26 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-insert.svg +10 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-key.svg +11 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-newparagraph.svg +11 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-noicon.svg +7 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-note.svg +42 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/annotation-paragraph.svg +16 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/loading-icon.gif +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/shadow.png +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/images/texture.png +0 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/pdf_viewer.css +400 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/pdf_viewer.js +7677 -0
- package/lib/cafe-pdf/src/pdfjs-dist/web/pdf_viewer.js.map +1 -0
- package/lib/cafe-pdf/src/pdfjs-dist/webpack.js +24 -0
- package/lib/cafe-pdf/src/tree/index.vue +144 -0
- package/lib/index.js +12 -0
- package/package/7f9ebfad849b2bfdfe92.worker.js +13853 -0
- package/package/cafe-pdf.common.js +26714 -0
- package/package/cafe-pdf.common.noprefetch-78-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78ms-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-78ms-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-83pv-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-90ms-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-90ms-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-90msp-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-90msp-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-90pv-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-90pv-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Add-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Add-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Add-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Add-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-0-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-1-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-3-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-4-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-5-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-6-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-CNS1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-0-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-1-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-3-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-4-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-5-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-GB1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-0-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-1-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-3-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-4-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-5-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-6-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Japan1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Korea1-0-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Korea1-1-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Korea1-2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Adobe-Korea1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-B5pc-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-B5pc-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-CNS-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-CNS-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-CNS1-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-CNS1-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-CNS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-CNS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-ETHK-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-ETHK-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-ETen-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-ETen-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-ETenms-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-ETenms-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Ext-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Ext-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Ext-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Ext-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GB-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GB-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GB-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GB-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBK-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBK-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBK2K-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBK2K-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBKp-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBKp-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBT-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBT-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBT-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBT-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBTpc-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBTpc-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBpc-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-GBpc-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKdla-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKdla-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKdlb-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKdlb-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKgccs-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKgccs-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKm314-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKm314-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKm471-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKm471-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKscs-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-HKscs-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Hankaku-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Hiragana-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSC-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSC-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSC-Johab-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSC-Johab-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSCms-UHC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSCms-UHC-HW-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSCms-UHC-HW-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSCms-UHC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSCpc-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-KSCpc-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Katakana-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-NWP-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-NWP-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-Roman-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniCNS-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniGB-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UCS2-HW-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UCS2-HW-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS2004-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS2004-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS2004-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS2004-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS2004-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJIS2004-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISPro-UCS2-HW-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISPro-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISPro-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISX0213-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISX0213-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISX02132004-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniJISX02132004-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-UniKS-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-V-bcmap.js +11 -0
- package/package/cafe-pdf.common.noprefetch-WP-Symbol-bcmap.js +11 -0
- package/package/cafe-pdf.common.pdfjsWorker.js +230 -0
- package/package/cafe-pdf.css +1 -0
- package/package/cafe-pdf.umd.js +26724 -0
- package/package/cafe-pdf.umd.min.js +10 -0
- package/package/cafe-pdf.umd.min.noprefetch-78-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78ms-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-78ms-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-83pv-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-90ms-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-90ms-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-90msp-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-90msp-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-90pv-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-90pv-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Add-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Add-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Add-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Add-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-0-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-1-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-3-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-4-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-5-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-6-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-CNS1-UCS2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-0-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-1-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-3-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-4-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-5-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-GB1-UCS2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-0-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-1-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-3-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-4-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-5-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-6-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Japan1-UCS2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Korea1-0-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Korea1-1-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Korea1-2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Adobe-Korea1-UCS2-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-B5pc-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-B5pc-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-CNS-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-CNS-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-CNS1-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-CNS1-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-CNS2-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-CNS2-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-ETHK-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-ETHK-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-ETen-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-ETen-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-ETenms-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-ETenms-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Ext-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Ext-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Ext-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Ext-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GB-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GB-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GB-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GB-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBK-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBK-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBK2K-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBK2K-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBKp-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBKp-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBT-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBT-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBT-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBT-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBTpc-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBTpc-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBpc-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-GBpc-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKdla-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKdla-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKdlb-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKdlb-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKgccs-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKgccs-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKm314-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKm314-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKm471-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKm471-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKscs-B5-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-HKscs-B5-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Hankaku-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Hiragana-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSC-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSC-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSC-Johab-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSC-Johab-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSCms-UHC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSCms-UHC-HW-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSCms-UHC-HW-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSCms-UHC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSCpc-EUC-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-KSCpc-EUC-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Katakana-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-NWP-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-NWP-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-RKSJ-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-RKSJ-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-Roman-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UCS2-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UCS2-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UTF16-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UTF16-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UTF8-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniCNS-UTF8-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UCS2-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UCS2-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UTF16-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UTF16-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UTF8-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniGB-UTF8-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UCS2-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UCS2-HW-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UCS2-HW-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UCS2-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UTF16-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UTF16-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UTF8-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS-UTF8-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS2004-UTF16-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS2004-UTF16-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS2004-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS2004-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS2004-UTF8-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJIS2004-UTF8-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISPro-UCS2-HW-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISPro-UCS2-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISPro-UTF8-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISX0213-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISX0213-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISX02132004-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniJISX02132004-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UCS2-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UCS2-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UTF16-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UTF16-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UTF32-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UTF32-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UTF8-H-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-UniKS-UTF8-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-V-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.noprefetch-WP-Symbol-bcmap.js +1 -0
- package/package/cafe-pdf.umd.min.pdfjsWorker.js +1 -0
- package/package/cafe-pdf.umd.noprefetch-78-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78ms-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-78ms-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-83pv-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-90ms-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-90ms-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-90msp-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-90msp-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-90pv-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-90pv-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Add-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Add-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Add-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Add-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-0-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-1-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-3-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-4-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-5-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-6-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-CNS1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-0-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-1-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-3-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-4-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-5-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-GB1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-0-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-1-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-3-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-4-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-5-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-6-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Japan1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Korea1-0-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Korea1-1-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Korea1-2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Adobe-Korea1-UCS2-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-B5pc-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-B5pc-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-CNS-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-CNS-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-CNS1-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-CNS1-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-CNS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-CNS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-ETHK-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-ETHK-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-ETen-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-ETen-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-ETenms-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-ETenms-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Ext-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Ext-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Ext-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Ext-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GB-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GB-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GB-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GB-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBK-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBK-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBK2K-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBK2K-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBKp-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBKp-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBT-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBT-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBT-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBT-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBTpc-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBTpc-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBpc-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-GBpc-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKdla-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKdla-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKdlb-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKdlb-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKgccs-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKgccs-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKm314-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKm314-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKm471-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKm471-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKscs-B5-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-HKscs-B5-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Hankaku-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Hiragana-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSC-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSC-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSC-Johab-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSC-Johab-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSCms-UHC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSCms-UHC-HW-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSCms-UHC-HW-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSCms-UHC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSCpc-EUC-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-KSCpc-EUC-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Katakana-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-NWP-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-NWP-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-RKSJ-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-RKSJ-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-Roman-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniCNS-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniGB-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UCS2-HW-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UCS2-HW-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS2004-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS2004-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS2004-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS2004-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS2004-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJIS2004-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISPro-UCS2-HW-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISPro-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISPro-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISX0213-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISX0213-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISX02132004-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniJISX02132004-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UCS2-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UCS2-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UTF16-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UTF16-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UTF32-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UTF32-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UTF8-H-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-UniKS-UTF8-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-V-bcmap.js +11 -0
- package/package/cafe-pdf.umd.noprefetch-WP-Symbol-bcmap.js +11 -0
- package/package/cafe-pdf.umd.pdfjsWorker.js +230 -0
- package/package/cda8beb0a7b3fc08c6f6.worker.js +10 -0
- package/package/demo.html +10 -0
- package/package.json +45 -0
@@ -0,0 +1,2595 @@
|
|
1
|
+
/**
|
2
|
+
* @licstart The following is the entire license notice for the
|
3
|
+
* Javascript code in this page
|
4
|
+
*
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
*
|
19
|
+
* @licend The above is the entire license notice for the
|
20
|
+
* Javascript code in this page
|
21
|
+
*/
|
22
|
+
"use strict";
|
23
|
+
|
24
|
+
Object.defineProperty(exports, "__esModule", {
|
25
|
+
value: true
|
26
|
+
});
|
27
|
+
exports.getDocument = getDocument;
|
28
|
+
exports.setPDFNetworkStreamFactory = setPDFNetworkStreamFactory;
|
29
|
+
exports.build = exports.version = exports.PDFPageProxy = exports.PDFDocumentProxy = exports.PDFWorker = exports.PDFDataRangeTransport = exports.LoopbackPort = void 0;
|
30
|
+
|
31
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
32
|
+
|
33
|
+
var _util = require("../shared/util");
|
34
|
+
|
35
|
+
var _display_utils = require("./display_utils");
|
36
|
+
|
37
|
+
var _font_loader = require("./font_loader");
|
38
|
+
|
39
|
+
var _api_compatibility = require("./api_compatibility");
|
40
|
+
|
41
|
+
var _canvas = require("./canvas");
|
42
|
+
|
43
|
+
var _global_scope = _interopRequireDefault(require("../shared/global_scope"));
|
44
|
+
|
45
|
+
var _worker_options = require("./worker_options");
|
46
|
+
|
47
|
+
var _message_handler = require("../shared/message_handler");
|
48
|
+
|
49
|
+
var _metadata = require("./metadata");
|
50
|
+
|
51
|
+
var _transport_stream = require("./transport_stream");
|
52
|
+
|
53
|
+
var _webgl = require("./webgl");
|
54
|
+
|
55
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
56
|
+
|
57
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
58
|
+
|
59
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
60
|
+
|
61
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
62
|
+
|
63
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
64
|
+
|
65
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
66
|
+
|
67
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
68
|
+
|
69
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
70
|
+
|
71
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
72
|
+
|
73
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
74
|
+
|
75
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
76
|
+
|
77
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
78
|
+
|
79
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
80
|
+
|
81
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
82
|
+
|
83
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
84
|
+
|
85
|
+
var DEFAULT_RANGE_CHUNK_SIZE = 65536;
|
86
|
+
var RENDERING_CANCELLED_TIMEOUT = 100;
|
87
|
+
var isWorkerDisabled = false;
|
88
|
+
var fallbackWorkerSrc;
|
89
|
+
var fakeWorkerFilesLoader = null;
|
90
|
+
{
|
91
|
+
var useRequireEnsure = false;
|
92
|
+
|
93
|
+
if (typeof window === 'undefined') {
|
94
|
+
isWorkerDisabled = true;
|
95
|
+
|
96
|
+
if (typeof require.ensure === 'undefined') {
|
97
|
+
require.ensure = require('node-ensure');
|
98
|
+
}
|
99
|
+
|
100
|
+
useRequireEnsure = true;
|
101
|
+
} else if (typeof require !== 'undefined' && typeof require.ensure === 'function') {
|
102
|
+
useRequireEnsure = true;
|
103
|
+
}
|
104
|
+
|
105
|
+
if (typeof requirejs !== 'undefined' && requirejs.toUrl) {
|
106
|
+
fallbackWorkerSrc = requirejs.toUrl('pdfjs-dist/build/pdf.worker.js');
|
107
|
+
}
|
108
|
+
|
109
|
+
var dynamicLoaderSupported = typeof requirejs !== 'undefined' && requirejs.load;
|
110
|
+
fakeWorkerFilesLoader = useRequireEnsure ? function () {
|
111
|
+
return new Promise(function (resolve, reject) {
|
112
|
+
require.ensure([], function () {
|
113
|
+
try {
|
114
|
+
var worker;
|
115
|
+
worker = require('../pdf.worker.js');
|
116
|
+
resolve(worker.WorkerMessageHandler);
|
117
|
+
} catch (ex) {
|
118
|
+
reject(ex);
|
119
|
+
}
|
120
|
+
}, reject, 'pdfjsWorker');
|
121
|
+
});
|
122
|
+
} : dynamicLoaderSupported ? function () {
|
123
|
+
return new Promise(function (resolve, reject) {
|
124
|
+
requirejs(['pdfjs-dist/build/pdf.worker'], function (worker) {
|
125
|
+
try {
|
126
|
+
resolve(worker.WorkerMessageHandler);
|
127
|
+
} catch (ex) {
|
128
|
+
reject(ex);
|
129
|
+
}
|
130
|
+
}, reject);
|
131
|
+
});
|
132
|
+
} : null;
|
133
|
+
|
134
|
+
if (!fallbackWorkerSrc && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && 'currentScript' in document) {
|
135
|
+
var pdfjsFilePath = document.currentScript && document.currentScript.src;
|
136
|
+
|
137
|
+
if (pdfjsFilePath) {
|
138
|
+
fallbackWorkerSrc = pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i, '.worker$1$2');
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
var createPDFNetworkStream;
|
143
|
+
|
144
|
+
function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {
|
145
|
+
createPDFNetworkStream = pdfNetworkStreamFactory;
|
146
|
+
}
|
147
|
+
|
148
|
+
function getDocument(src) {
|
149
|
+
var task = new PDFDocumentLoadingTask();
|
150
|
+
var source;
|
151
|
+
|
152
|
+
if (typeof src === 'string') {
|
153
|
+
source = {
|
154
|
+
url: src
|
155
|
+
};
|
156
|
+
} else if ((0, _util.isArrayBuffer)(src)) {
|
157
|
+
source = {
|
158
|
+
data: src
|
159
|
+
};
|
160
|
+
} else if (src instanceof PDFDataRangeTransport) {
|
161
|
+
source = {
|
162
|
+
range: src
|
163
|
+
};
|
164
|
+
} else {
|
165
|
+
if (_typeof(src) !== 'object') {
|
166
|
+
throw new Error('Invalid parameter in getDocument, ' + 'need either Uint8Array, string or a parameter object');
|
167
|
+
}
|
168
|
+
|
169
|
+
if (!src.url && !src.data && !src.range) {
|
170
|
+
throw new Error('Invalid parameter object: need either .data, .range or .url');
|
171
|
+
}
|
172
|
+
|
173
|
+
source = src;
|
174
|
+
}
|
175
|
+
|
176
|
+
var params = Object.create(null);
|
177
|
+
var rangeTransport = null,
|
178
|
+
worker = null;
|
179
|
+
|
180
|
+
for (var key in source) {
|
181
|
+
if (key === 'url' && typeof window !== 'undefined') {
|
182
|
+
params[key] = new URL(source[key], window.location).href;
|
183
|
+
continue;
|
184
|
+
} else if (key === 'range') {
|
185
|
+
rangeTransport = source[key];
|
186
|
+
continue;
|
187
|
+
} else if (key === 'worker') {
|
188
|
+
worker = source[key];
|
189
|
+
continue;
|
190
|
+
} else if (key === 'data' && !(source[key] instanceof Uint8Array)) {
|
191
|
+
var pdfBytes = source[key];
|
192
|
+
|
193
|
+
if (typeof pdfBytes === 'string') {
|
194
|
+
params[key] = (0, _util.stringToBytes)(pdfBytes);
|
195
|
+
} else if (_typeof(pdfBytes) === 'object' && pdfBytes !== null && !isNaN(pdfBytes.length)) {
|
196
|
+
params[key] = new Uint8Array(pdfBytes);
|
197
|
+
} else if ((0, _util.isArrayBuffer)(pdfBytes)) {
|
198
|
+
params[key] = new Uint8Array(pdfBytes);
|
199
|
+
} else {
|
200
|
+
throw new Error('Invalid PDF binary data: either typed array, ' + 'string or array-like object is expected in the ' + 'data property.');
|
201
|
+
}
|
202
|
+
|
203
|
+
continue;
|
204
|
+
}
|
205
|
+
|
206
|
+
params[key] = source[key];
|
207
|
+
}
|
208
|
+
|
209
|
+
params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE;
|
210
|
+
params.CMapReaderFactory = params.CMapReaderFactory || _display_utils.DOMCMapReaderFactory;
|
211
|
+
params.ignoreErrors = params.stopAtErrors !== true;
|
212
|
+
params.pdfBug = params.pdfBug === true;
|
213
|
+
var NativeImageDecoderValues = Object.values(_util.NativeImageDecoding);
|
214
|
+
|
215
|
+
if (params.nativeImageDecoderSupport === undefined || !NativeImageDecoderValues.includes(params.nativeImageDecoderSupport)) {
|
216
|
+
params.nativeImageDecoderSupport = _api_compatibility.apiCompatibilityParams.nativeImageDecoderSupport || _util.NativeImageDecoding.DECODE;
|
217
|
+
}
|
218
|
+
|
219
|
+
if (!Number.isInteger(params.maxImageSize)) {
|
220
|
+
params.maxImageSize = -1;
|
221
|
+
}
|
222
|
+
|
223
|
+
if (typeof params.isEvalSupported !== 'boolean') {
|
224
|
+
params.isEvalSupported = true;
|
225
|
+
}
|
226
|
+
|
227
|
+
if (typeof params.disableFontFace !== 'boolean') {
|
228
|
+
params.disableFontFace = _api_compatibility.apiCompatibilityParams.disableFontFace || false;
|
229
|
+
}
|
230
|
+
|
231
|
+
if (typeof params.disableRange !== 'boolean') {
|
232
|
+
params.disableRange = false;
|
233
|
+
}
|
234
|
+
|
235
|
+
if (typeof params.disableStream !== 'boolean') {
|
236
|
+
params.disableStream = false;
|
237
|
+
}
|
238
|
+
|
239
|
+
if (typeof params.disableAutoFetch !== 'boolean') {
|
240
|
+
params.disableAutoFetch = false;
|
241
|
+
}
|
242
|
+
|
243
|
+
if (typeof params.disableCreateObjectURL !== 'boolean') {
|
244
|
+
params.disableCreateObjectURL = _api_compatibility.apiCompatibilityParams.disableCreateObjectURL || false;
|
245
|
+
}
|
246
|
+
|
247
|
+
(0, _util.setVerbosityLevel)(params.verbosity);
|
248
|
+
|
249
|
+
if (!worker) {
|
250
|
+
var workerParams = {
|
251
|
+
verbosity: params.verbosity,
|
252
|
+
port: _worker_options.GlobalWorkerOptions.workerPort
|
253
|
+
};
|
254
|
+
worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams);
|
255
|
+
task._worker = worker;
|
256
|
+
}
|
257
|
+
|
258
|
+
var docId = task.docId;
|
259
|
+
worker.promise.then(function () {
|
260
|
+
if (task.destroyed) {
|
261
|
+
throw new Error('Loading aborted');
|
262
|
+
}
|
263
|
+
|
264
|
+
return _fetchDocument(worker, params, rangeTransport, docId).then(function (workerId) {
|
265
|
+
if (task.destroyed) {
|
266
|
+
throw new Error('Loading aborted');
|
267
|
+
}
|
268
|
+
|
269
|
+
var networkStream;
|
270
|
+
|
271
|
+
if (rangeTransport) {
|
272
|
+
networkStream = new _transport_stream.PDFDataTransportStream({
|
273
|
+
length: params.length,
|
274
|
+
initialData: params.initialData,
|
275
|
+
progressiveDone: params.progressiveDone,
|
276
|
+
disableRange: params.disableRange,
|
277
|
+
disableStream: params.disableStream
|
278
|
+
}, rangeTransport);
|
279
|
+
} else if (!params.data) {
|
280
|
+
networkStream = createPDFNetworkStream({
|
281
|
+
url: params.url,
|
282
|
+
length: params.length,
|
283
|
+
httpHeaders: params.httpHeaders,
|
284
|
+
withCredentials: params.withCredentials,
|
285
|
+
rangeChunkSize: params.rangeChunkSize,
|
286
|
+
disableRange: params.disableRange,
|
287
|
+
disableStream: params.disableStream
|
288
|
+
});
|
289
|
+
}
|
290
|
+
|
291
|
+
var messageHandler = new _message_handler.MessageHandler(docId, workerId, worker.port);
|
292
|
+
messageHandler.postMessageTransfers = worker.postMessageTransfers;
|
293
|
+
var transport = new WorkerTransport(messageHandler, task, networkStream, params);
|
294
|
+
task._transport = transport;
|
295
|
+
messageHandler.send('Ready', null);
|
296
|
+
});
|
297
|
+
})["catch"](task._capability.reject);
|
298
|
+
return task;
|
299
|
+
}
|
300
|
+
|
301
|
+
function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
302
|
+
if (worker.destroyed) {
|
303
|
+
return Promise.reject(new Error('Worker was destroyed'));
|
304
|
+
}
|
305
|
+
|
306
|
+
if (pdfDataRangeTransport) {
|
307
|
+
source.length = pdfDataRangeTransport.length;
|
308
|
+
source.initialData = pdfDataRangeTransport.initialData;
|
309
|
+
source.progressiveDone = pdfDataRangeTransport.progressiveDone;
|
310
|
+
}
|
311
|
+
|
312
|
+
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
313
|
+
docId: docId,
|
314
|
+
apiVersion: '2.3.200',
|
315
|
+
source: {
|
316
|
+
data: source.data,
|
317
|
+
url: source.url,
|
318
|
+
password: source.password,
|
319
|
+
disableAutoFetch: source.disableAutoFetch,
|
320
|
+
rangeChunkSize: source.rangeChunkSize,
|
321
|
+
length: source.length
|
322
|
+
},
|
323
|
+
maxImageSize: source.maxImageSize,
|
324
|
+
disableFontFace: source.disableFontFace,
|
325
|
+
disableCreateObjectURL: source.disableCreateObjectURL,
|
326
|
+
postMessageTransfers: worker.postMessageTransfers,
|
327
|
+
docBaseUrl: source.docBaseUrl,
|
328
|
+
nativeImageDecoderSupport: source.nativeImageDecoderSupport,
|
329
|
+
ignoreErrors: source.ignoreErrors,
|
330
|
+
isEvalSupported: source.isEvalSupported
|
331
|
+
}).then(function (workerId) {
|
332
|
+
if (worker.destroyed) {
|
333
|
+
throw new Error('Worker was destroyed');
|
334
|
+
}
|
335
|
+
|
336
|
+
return workerId;
|
337
|
+
});
|
338
|
+
}
|
339
|
+
|
340
|
+
var PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() {
|
341
|
+
var nextDocumentId = 0;
|
342
|
+
|
343
|
+
var PDFDocumentLoadingTask =
|
344
|
+
/*#__PURE__*/
|
345
|
+
function () {
|
346
|
+
function PDFDocumentLoadingTask() {
|
347
|
+
_classCallCheck(this, PDFDocumentLoadingTask);
|
348
|
+
|
349
|
+
this._capability = (0, _util.createPromiseCapability)();
|
350
|
+
this._transport = null;
|
351
|
+
this._worker = null;
|
352
|
+
this.docId = 'd' + nextDocumentId++;
|
353
|
+
this.destroyed = false;
|
354
|
+
this.onPassword = null;
|
355
|
+
this.onProgress = null;
|
356
|
+
this.onUnsupportedFeature = null;
|
357
|
+
}
|
358
|
+
|
359
|
+
_createClass(PDFDocumentLoadingTask, [{
|
360
|
+
key: "destroy",
|
361
|
+
value: function destroy() {
|
362
|
+
var _this = this;
|
363
|
+
|
364
|
+
this.destroyed = true;
|
365
|
+
var transportDestroyed = !this._transport ? Promise.resolve() : this._transport.destroy();
|
366
|
+
return transportDestroyed.then(function () {
|
367
|
+
_this._transport = null;
|
368
|
+
|
369
|
+
if (_this._worker) {
|
370
|
+
_this._worker.destroy();
|
371
|
+
|
372
|
+
_this._worker = null;
|
373
|
+
}
|
374
|
+
});
|
375
|
+
}
|
376
|
+
}, {
|
377
|
+
key: "then",
|
378
|
+
value: function then(onFulfilled, onRejected) {
|
379
|
+
(0, _display_utils.deprecated)('PDFDocumentLoadingTask.then method, ' + 'use the `promise` getter instead.');
|
380
|
+
return this.promise.then.apply(this.promise, arguments);
|
381
|
+
}
|
382
|
+
}, {
|
383
|
+
key: "promise",
|
384
|
+
get: function get() {
|
385
|
+
return this._capability.promise;
|
386
|
+
}
|
387
|
+
}]);
|
388
|
+
|
389
|
+
return PDFDocumentLoadingTask;
|
390
|
+
}();
|
391
|
+
|
392
|
+
return PDFDocumentLoadingTask;
|
393
|
+
}();
|
394
|
+
|
395
|
+
var PDFDataRangeTransport =
|
396
|
+
/*#__PURE__*/
|
397
|
+
function () {
|
398
|
+
function PDFDataRangeTransport(length, initialData) {
|
399
|
+
var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
400
|
+
|
401
|
+
_classCallCheck(this, PDFDataRangeTransport);
|
402
|
+
|
403
|
+
this.length = length;
|
404
|
+
this.initialData = initialData;
|
405
|
+
this.progressiveDone = progressiveDone;
|
406
|
+
this._rangeListeners = [];
|
407
|
+
this._progressListeners = [];
|
408
|
+
this._progressiveReadListeners = [];
|
409
|
+
this._progressiveDoneListeners = [];
|
410
|
+
this._readyCapability = (0, _util.createPromiseCapability)();
|
411
|
+
}
|
412
|
+
|
413
|
+
_createClass(PDFDataRangeTransport, [{
|
414
|
+
key: "addRangeListener",
|
415
|
+
value: function addRangeListener(listener) {
|
416
|
+
this._rangeListeners.push(listener);
|
417
|
+
}
|
418
|
+
}, {
|
419
|
+
key: "addProgressListener",
|
420
|
+
value: function addProgressListener(listener) {
|
421
|
+
this._progressListeners.push(listener);
|
422
|
+
}
|
423
|
+
}, {
|
424
|
+
key: "addProgressiveReadListener",
|
425
|
+
value: function addProgressiveReadListener(listener) {
|
426
|
+
this._progressiveReadListeners.push(listener);
|
427
|
+
}
|
428
|
+
}, {
|
429
|
+
key: "addProgressiveDoneListener",
|
430
|
+
value: function addProgressiveDoneListener(listener) {
|
431
|
+
this._progressiveDoneListeners.push(listener);
|
432
|
+
}
|
433
|
+
}, {
|
434
|
+
key: "onDataRange",
|
435
|
+
value: function onDataRange(begin, chunk) {
|
436
|
+
var _iteratorNormalCompletion = true;
|
437
|
+
var _didIteratorError = false;
|
438
|
+
var _iteratorError = undefined;
|
439
|
+
|
440
|
+
try {
|
441
|
+
for (var _iterator = this._rangeListeners[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
442
|
+
var listener = _step.value;
|
443
|
+
listener(begin, chunk);
|
444
|
+
}
|
445
|
+
} catch (err) {
|
446
|
+
_didIteratorError = true;
|
447
|
+
_iteratorError = err;
|
448
|
+
} finally {
|
449
|
+
try {
|
450
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
451
|
+
_iterator["return"]();
|
452
|
+
}
|
453
|
+
} finally {
|
454
|
+
if (_didIteratorError) {
|
455
|
+
throw _iteratorError;
|
456
|
+
}
|
457
|
+
}
|
458
|
+
}
|
459
|
+
}
|
460
|
+
}, {
|
461
|
+
key: "onDataProgress",
|
462
|
+
value: function onDataProgress(loaded, total) {
|
463
|
+
var _this2 = this;
|
464
|
+
|
465
|
+
this._readyCapability.promise.then(function () {
|
466
|
+
var _iteratorNormalCompletion2 = true;
|
467
|
+
var _didIteratorError2 = false;
|
468
|
+
var _iteratorError2 = undefined;
|
469
|
+
|
470
|
+
try {
|
471
|
+
for (var _iterator2 = _this2._progressListeners[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
472
|
+
var listener = _step2.value;
|
473
|
+
listener(loaded, total);
|
474
|
+
}
|
475
|
+
} catch (err) {
|
476
|
+
_didIteratorError2 = true;
|
477
|
+
_iteratorError2 = err;
|
478
|
+
} finally {
|
479
|
+
try {
|
480
|
+
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
|
481
|
+
_iterator2["return"]();
|
482
|
+
}
|
483
|
+
} finally {
|
484
|
+
if (_didIteratorError2) {
|
485
|
+
throw _iteratorError2;
|
486
|
+
}
|
487
|
+
}
|
488
|
+
}
|
489
|
+
});
|
490
|
+
}
|
491
|
+
}, {
|
492
|
+
key: "onDataProgressiveRead",
|
493
|
+
value: function onDataProgressiveRead(chunk) {
|
494
|
+
var _this3 = this;
|
495
|
+
|
496
|
+
this._readyCapability.promise.then(function () {
|
497
|
+
var _iteratorNormalCompletion3 = true;
|
498
|
+
var _didIteratorError3 = false;
|
499
|
+
var _iteratorError3 = undefined;
|
500
|
+
|
501
|
+
try {
|
502
|
+
for (var _iterator3 = _this3._progressiveReadListeners[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
503
|
+
var listener = _step3.value;
|
504
|
+
listener(chunk);
|
505
|
+
}
|
506
|
+
} catch (err) {
|
507
|
+
_didIteratorError3 = true;
|
508
|
+
_iteratorError3 = err;
|
509
|
+
} finally {
|
510
|
+
try {
|
511
|
+
if (!_iteratorNormalCompletion3 && _iterator3["return"] != null) {
|
512
|
+
_iterator3["return"]();
|
513
|
+
}
|
514
|
+
} finally {
|
515
|
+
if (_didIteratorError3) {
|
516
|
+
throw _iteratorError3;
|
517
|
+
}
|
518
|
+
}
|
519
|
+
}
|
520
|
+
});
|
521
|
+
}
|
522
|
+
}, {
|
523
|
+
key: "onDataProgressiveDone",
|
524
|
+
value: function onDataProgressiveDone() {
|
525
|
+
var _this4 = this;
|
526
|
+
|
527
|
+
this._readyCapability.promise.then(function () {
|
528
|
+
var _iteratorNormalCompletion4 = true;
|
529
|
+
var _didIteratorError4 = false;
|
530
|
+
var _iteratorError4 = undefined;
|
531
|
+
|
532
|
+
try {
|
533
|
+
for (var _iterator4 = _this4._progressiveDoneListeners[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
|
534
|
+
var listener = _step4.value;
|
535
|
+
listener();
|
536
|
+
}
|
537
|
+
} catch (err) {
|
538
|
+
_didIteratorError4 = true;
|
539
|
+
_iteratorError4 = err;
|
540
|
+
} finally {
|
541
|
+
try {
|
542
|
+
if (!_iteratorNormalCompletion4 && _iterator4["return"] != null) {
|
543
|
+
_iterator4["return"]();
|
544
|
+
}
|
545
|
+
} finally {
|
546
|
+
if (_didIteratorError4) {
|
547
|
+
throw _iteratorError4;
|
548
|
+
}
|
549
|
+
}
|
550
|
+
}
|
551
|
+
});
|
552
|
+
}
|
553
|
+
}, {
|
554
|
+
key: "transportReady",
|
555
|
+
value: function transportReady() {
|
556
|
+
this._readyCapability.resolve();
|
557
|
+
}
|
558
|
+
}, {
|
559
|
+
key: "requestDataRange",
|
560
|
+
value: function requestDataRange(begin, end) {
|
561
|
+
(0, _util.unreachable)('Abstract method PDFDataRangeTransport.requestDataRange');
|
562
|
+
}
|
563
|
+
}, {
|
564
|
+
key: "abort",
|
565
|
+
value: function abort() {}
|
566
|
+
}]);
|
567
|
+
|
568
|
+
return PDFDataRangeTransport;
|
569
|
+
}();
|
570
|
+
|
571
|
+
exports.PDFDataRangeTransport = PDFDataRangeTransport;
|
572
|
+
|
573
|
+
var PDFDocumentProxy =
|
574
|
+
/*#__PURE__*/
|
575
|
+
function () {
|
576
|
+
function PDFDocumentProxy(pdfInfo, transport) {
|
577
|
+
_classCallCheck(this, PDFDocumentProxy);
|
578
|
+
|
579
|
+
this._pdfInfo = pdfInfo;
|
580
|
+
this._transport = transport;
|
581
|
+
}
|
582
|
+
|
583
|
+
_createClass(PDFDocumentProxy, [{
|
584
|
+
key: "getPage",
|
585
|
+
value: function getPage(pageNumber) {
|
586
|
+
return this._transport.getPage(pageNumber);
|
587
|
+
}
|
588
|
+
}, {
|
589
|
+
key: "getPageIndex",
|
590
|
+
value: function getPageIndex(ref) {
|
591
|
+
return this._transport.getPageIndex(ref);
|
592
|
+
}
|
593
|
+
}, {
|
594
|
+
key: "getDestinations",
|
595
|
+
value: function getDestinations() {
|
596
|
+
return this._transport.getDestinations();
|
597
|
+
}
|
598
|
+
}, {
|
599
|
+
key: "getDestination",
|
600
|
+
value: function getDestination(id) {
|
601
|
+
return this._transport.getDestination(id);
|
602
|
+
}
|
603
|
+
}, {
|
604
|
+
key: "getPageLabels",
|
605
|
+
value: function getPageLabels() {
|
606
|
+
return this._transport.getPageLabels();
|
607
|
+
}
|
608
|
+
}, {
|
609
|
+
key: "getPageLayout",
|
610
|
+
value: function getPageLayout() {
|
611
|
+
return this._transport.getPageLayout();
|
612
|
+
}
|
613
|
+
}, {
|
614
|
+
key: "getPageMode",
|
615
|
+
value: function getPageMode() {
|
616
|
+
return this._transport.getPageMode();
|
617
|
+
}
|
618
|
+
}, {
|
619
|
+
key: "getViewerPreferences",
|
620
|
+
value: function getViewerPreferences() {
|
621
|
+
return this._transport.getViewerPreferences();
|
622
|
+
}
|
623
|
+
}, {
|
624
|
+
key: "getOpenActionDestination",
|
625
|
+
value: function getOpenActionDestination() {
|
626
|
+
return this._transport.getOpenActionDestination();
|
627
|
+
}
|
628
|
+
}, {
|
629
|
+
key: "getAttachments",
|
630
|
+
value: function getAttachments() {
|
631
|
+
return this._transport.getAttachments();
|
632
|
+
}
|
633
|
+
}, {
|
634
|
+
key: "getJavaScript",
|
635
|
+
value: function getJavaScript() {
|
636
|
+
return this._transport.getJavaScript();
|
637
|
+
}
|
638
|
+
}, {
|
639
|
+
key: "getOutline",
|
640
|
+
value: function getOutline() {
|
641
|
+
return this._transport.getOutline();
|
642
|
+
}
|
643
|
+
}, {
|
644
|
+
key: "getPermissions",
|
645
|
+
value: function getPermissions() {
|
646
|
+
return this._transport.getPermissions();
|
647
|
+
}
|
648
|
+
}, {
|
649
|
+
key: "getMetadata",
|
650
|
+
value: function getMetadata() {
|
651
|
+
return this._transport.getMetadata();
|
652
|
+
}
|
653
|
+
}, {
|
654
|
+
key: "getData",
|
655
|
+
value: function getData() {
|
656
|
+
return this._transport.getData();
|
657
|
+
}
|
658
|
+
}, {
|
659
|
+
key: "getDownloadInfo",
|
660
|
+
value: function getDownloadInfo() {
|
661
|
+
return this._transport.downloadInfoCapability.promise;
|
662
|
+
}
|
663
|
+
}, {
|
664
|
+
key: "getStats",
|
665
|
+
value: function getStats() {
|
666
|
+
return this._transport.getStats();
|
667
|
+
}
|
668
|
+
}, {
|
669
|
+
key: "cleanup",
|
670
|
+
value: function cleanup() {
|
671
|
+
this._transport.startCleanup();
|
672
|
+
}
|
673
|
+
}, {
|
674
|
+
key: "destroy",
|
675
|
+
value: function destroy() {
|
676
|
+
return this.loadingTask.destroy();
|
677
|
+
}
|
678
|
+
}, {
|
679
|
+
key: "numPages",
|
680
|
+
get: function get() {
|
681
|
+
return this._pdfInfo.numPages;
|
682
|
+
}
|
683
|
+
}, {
|
684
|
+
key: "fingerprint",
|
685
|
+
get: function get() {
|
686
|
+
return this._pdfInfo.fingerprint;
|
687
|
+
}
|
688
|
+
}, {
|
689
|
+
key: "loadingParams",
|
690
|
+
get: function get() {
|
691
|
+
return this._transport.loadingParams;
|
692
|
+
}
|
693
|
+
}, {
|
694
|
+
key: "loadingTask",
|
695
|
+
get: function get() {
|
696
|
+
return this._transport.loadingTask;
|
697
|
+
}
|
698
|
+
}]);
|
699
|
+
|
700
|
+
return PDFDocumentProxy;
|
701
|
+
}();
|
702
|
+
|
703
|
+
exports.PDFDocumentProxy = PDFDocumentProxy;
|
704
|
+
|
705
|
+
var PDFPageProxy =
|
706
|
+
/*#__PURE__*/
|
707
|
+
function () {
|
708
|
+
function PDFPageProxy(pageIndex, pageInfo, transport) {
|
709
|
+
var pdfBug = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
710
|
+
|
711
|
+
_classCallCheck(this, PDFPageProxy);
|
712
|
+
|
713
|
+
this.pageIndex = pageIndex;
|
714
|
+
this._pageInfo = pageInfo;
|
715
|
+
this._transport = transport;
|
716
|
+
this._stats = pdfBug ? new _display_utils.StatTimer() : _display_utils.DummyStatTimer;
|
717
|
+
this._pdfBug = pdfBug;
|
718
|
+
this.commonObjs = transport.commonObjs;
|
719
|
+
this.objs = new PDFObjects();
|
720
|
+
this.cleanupAfterRender = false;
|
721
|
+
this.pendingCleanup = false;
|
722
|
+
this.intentStates = Object.create(null);
|
723
|
+
this.destroyed = false;
|
724
|
+
}
|
725
|
+
|
726
|
+
_createClass(PDFPageProxy, [{
|
727
|
+
key: "getViewport",
|
728
|
+
value: function getViewport() {
|
729
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
730
|
+
scale = _ref.scale,
|
731
|
+
_ref$rotation = _ref.rotation,
|
732
|
+
rotation = _ref$rotation === void 0 ? this.rotate : _ref$rotation,
|
733
|
+
_ref$dontFlip = _ref.dontFlip,
|
734
|
+
dontFlip = _ref$dontFlip === void 0 ? false : _ref$dontFlip;
|
735
|
+
|
736
|
+
if (arguments.length > 1 || typeof arguments[0] === 'number') {
|
737
|
+
(0, _display_utils.deprecated)('getViewport is called with obsolete arguments.');
|
738
|
+
scale = arguments[0];
|
739
|
+
rotation = typeof arguments[1] === 'number' ? arguments[1] : this.rotate;
|
740
|
+
dontFlip = typeof arguments[2] === 'boolean' ? arguments[2] : false;
|
741
|
+
}
|
742
|
+
|
743
|
+
return new _display_utils.PageViewport({
|
744
|
+
viewBox: this.view,
|
745
|
+
scale: scale,
|
746
|
+
rotation: rotation,
|
747
|
+
dontFlip: dontFlip
|
748
|
+
});
|
749
|
+
}
|
750
|
+
}, {
|
751
|
+
key: "getAnnotations",
|
752
|
+
value: function getAnnotations() {
|
753
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
754
|
+
_ref2$intent = _ref2.intent,
|
755
|
+
intent = _ref2$intent === void 0 ? null : _ref2$intent;
|
756
|
+
|
757
|
+
if (!this.annotationsPromise || this.annotationsIntent !== intent) {
|
758
|
+
this.annotationsPromise = this._transport.getAnnotations(this.pageIndex, intent);
|
759
|
+
this.annotationsIntent = intent;
|
760
|
+
}
|
761
|
+
|
762
|
+
return this.annotationsPromise;
|
763
|
+
}
|
764
|
+
}, {
|
765
|
+
key: "render",
|
766
|
+
value: function render(_ref3) {
|
767
|
+
var _this5 = this;
|
768
|
+
|
769
|
+
var canvasContext = _ref3.canvasContext,
|
770
|
+
viewport = _ref3.viewport,
|
771
|
+
_ref3$intent = _ref3.intent,
|
772
|
+
intent = _ref3$intent === void 0 ? 'display' : _ref3$intent,
|
773
|
+
_ref3$enableWebGL = _ref3.enableWebGL,
|
774
|
+
enableWebGL = _ref3$enableWebGL === void 0 ? false : _ref3$enableWebGL,
|
775
|
+
_ref3$renderInteracti = _ref3.renderInteractiveForms,
|
776
|
+
renderInteractiveForms = _ref3$renderInteracti === void 0 ? false : _ref3$renderInteracti,
|
777
|
+
_ref3$transform = _ref3.transform,
|
778
|
+
transform = _ref3$transform === void 0 ? null : _ref3$transform,
|
779
|
+
_ref3$imageLayer = _ref3.imageLayer,
|
780
|
+
imageLayer = _ref3$imageLayer === void 0 ? null : _ref3$imageLayer,
|
781
|
+
_ref3$canvasFactory = _ref3.canvasFactory,
|
782
|
+
canvasFactory = _ref3$canvasFactory === void 0 ? null : _ref3$canvasFactory,
|
783
|
+
_ref3$background = _ref3.background,
|
784
|
+
background = _ref3$background === void 0 ? null : _ref3$background;
|
785
|
+
var stats = this._stats;
|
786
|
+
stats.time('Overall');
|
787
|
+
var renderingIntent = intent === 'print' ? 'print' : 'display';
|
788
|
+
this.pendingCleanup = false;
|
789
|
+
|
790
|
+
if (!this.intentStates[renderingIntent]) {
|
791
|
+
this.intentStates[renderingIntent] = Object.create(null);
|
792
|
+
}
|
793
|
+
|
794
|
+
var intentState = this.intentStates[renderingIntent];
|
795
|
+
|
796
|
+
if (intentState.streamReaderCancelTimeout) {
|
797
|
+
clearTimeout(intentState.streamReaderCancelTimeout);
|
798
|
+
intentState.streamReaderCancelTimeout = null;
|
799
|
+
}
|
800
|
+
|
801
|
+
var canvasFactoryInstance = canvasFactory || new _display_utils.DOMCanvasFactory();
|
802
|
+
var webGLContext = new _webgl.WebGLContext({
|
803
|
+
enable: enableWebGL
|
804
|
+
});
|
805
|
+
|
806
|
+
if (!intentState.displayReadyCapability) {
|
807
|
+
intentState.displayReadyCapability = (0, _util.createPromiseCapability)();
|
808
|
+
intentState.operatorList = {
|
809
|
+
fnArray: [],
|
810
|
+
argsArray: [],
|
811
|
+
lastChunk: false
|
812
|
+
};
|
813
|
+
stats.time('Page Request');
|
814
|
+
|
815
|
+
this._pumpOperatorList({
|
816
|
+
pageIndex: this.pageNumber - 1,
|
817
|
+
intent: renderingIntent,
|
818
|
+
renderInteractiveForms: renderInteractiveForms === true
|
819
|
+
});
|
820
|
+
}
|
821
|
+
|
822
|
+
var complete = function complete(error) {
|
823
|
+
var i = intentState.renderTasks.indexOf(internalRenderTask);
|
824
|
+
|
825
|
+
if (i >= 0) {
|
826
|
+
intentState.renderTasks.splice(i, 1);
|
827
|
+
}
|
828
|
+
|
829
|
+
if (_this5.cleanupAfterRender || renderingIntent === 'print') {
|
830
|
+
_this5.pendingCleanup = true;
|
831
|
+
}
|
832
|
+
|
833
|
+
_this5._tryCleanup();
|
834
|
+
|
835
|
+
if (error) {
|
836
|
+
internalRenderTask.capability.reject(error);
|
837
|
+
|
838
|
+
_this5._abortOperatorList({
|
839
|
+
intentState: intentState,
|
840
|
+
reason: error
|
841
|
+
});
|
842
|
+
} else {
|
843
|
+
internalRenderTask.capability.resolve();
|
844
|
+
}
|
845
|
+
|
846
|
+
stats.timeEnd('Rendering');
|
847
|
+
stats.timeEnd('Overall');
|
848
|
+
};
|
849
|
+
|
850
|
+
var internalRenderTask = new InternalRenderTask({
|
851
|
+
callback: complete,
|
852
|
+
params: {
|
853
|
+
canvasContext: canvasContext,
|
854
|
+
viewport: viewport,
|
855
|
+
transform: transform,
|
856
|
+
imageLayer: imageLayer,
|
857
|
+
background: background
|
858
|
+
},
|
859
|
+
objs: this.objs,
|
860
|
+
commonObjs: this.commonObjs,
|
861
|
+
operatorList: intentState.operatorList,
|
862
|
+
pageNumber: this.pageNumber,
|
863
|
+
canvasFactory: canvasFactoryInstance,
|
864
|
+
webGLContext: webGLContext,
|
865
|
+
useRequestAnimationFrame: renderingIntent !== 'print',
|
866
|
+
pdfBug: this._pdfBug
|
867
|
+
});
|
868
|
+
|
869
|
+
if (!intentState.renderTasks) {
|
870
|
+
intentState.renderTasks = [];
|
871
|
+
}
|
872
|
+
|
873
|
+
intentState.renderTasks.push(internalRenderTask);
|
874
|
+
var renderTask = internalRenderTask.task;
|
875
|
+
intentState.displayReadyCapability.promise.then(function (transparency) {
|
876
|
+
if (_this5.pendingCleanup) {
|
877
|
+
complete();
|
878
|
+
return;
|
879
|
+
}
|
880
|
+
|
881
|
+
stats.time('Rendering');
|
882
|
+
internalRenderTask.initializeGraphics(transparency);
|
883
|
+
internalRenderTask.operatorListChanged();
|
884
|
+
})["catch"](complete);
|
885
|
+
return renderTask;
|
886
|
+
}
|
887
|
+
}, {
|
888
|
+
key: "getOperatorList",
|
889
|
+
value: function getOperatorList() {
|
890
|
+
function operatorListChanged() {
|
891
|
+
if (intentState.operatorList.lastChunk) {
|
892
|
+
intentState.opListReadCapability.resolve(intentState.operatorList);
|
893
|
+
var i = intentState.renderTasks.indexOf(opListTask);
|
894
|
+
|
895
|
+
if (i >= 0) {
|
896
|
+
intentState.renderTasks.splice(i, 1);
|
897
|
+
}
|
898
|
+
}
|
899
|
+
}
|
900
|
+
|
901
|
+
var renderingIntent = 'oplist';
|
902
|
+
|
903
|
+
if (!this.intentStates[renderingIntent]) {
|
904
|
+
this.intentStates[renderingIntent] = Object.create(null);
|
905
|
+
}
|
906
|
+
|
907
|
+
var intentState = this.intentStates[renderingIntent];
|
908
|
+
var opListTask;
|
909
|
+
|
910
|
+
if (!intentState.opListReadCapability) {
|
911
|
+
opListTask = {};
|
912
|
+
opListTask.operatorListChanged = operatorListChanged;
|
913
|
+
intentState.opListReadCapability = (0, _util.createPromiseCapability)();
|
914
|
+
intentState.renderTasks = [];
|
915
|
+
intentState.renderTasks.push(opListTask);
|
916
|
+
intentState.operatorList = {
|
917
|
+
fnArray: [],
|
918
|
+
argsArray: [],
|
919
|
+
lastChunk: false
|
920
|
+
};
|
921
|
+
|
922
|
+
this._stats.time('Page Request');
|
923
|
+
|
924
|
+
this._pumpOperatorList({
|
925
|
+
pageIndex: this.pageIndex,
|
926
|
+
intent: renderingIntent
|
927
|
+
});
|
928
|
+
}
|
929
|
+
|
930
|
+
return intentState.opListReadCapability.promise;
|
931
|
+
}
|
932
|
+
}, {
|
933
|
+
key: "streamTextContent",
|
934
|
+
value: function streamTextContent() {
|
935
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
936
|
+
_ref4$normalizeWhites = _ref4.normalizeWhitespace,
|
937
|
+
normalizeWhitespace = _ref4$normalizeWhites === void 0 ? false : _ref4$normalizeWhites,
|
938
|
+
_ref4$disableCombineT = _ref4.disableCombineTextItems,
|
939
|
+
disableCombineTextItems = _ref4$disableCombineT === void 0 ? false : _ref4$disableCombineT;
|
940
|
+
|
941
|
+
var TEXT_CONTENT_CHUNK_SIZE = 100;
|
942
|
+
return this._transport.messageHandler.sendWithStream('GetTextContent', {
|
943
|
+
pageIndex: this.pageNumber - 1,
|
944
|
+
normalizeWhitespace: normalizeWhitespace === true,
|
945
|
+
combineTextItems: disableCombineTextItems !== true
|
946
|
+
}, {
|
947
|
+
highWaterMark: TEXT_CONTENT_CHUNK_SIZE,
|
948
|
+
size: function size(textContent) {
|
949
|
+
return textContent.items.length;
|
950
|
+
}
|
951
|
+
});
|
952
|
+
}
|
953
|
+
}, {
|
954
|
+
key: "getTextContent",
|
955
|
+
value: function getTextContent() {
|
956
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
957
|
+
var readableStream = this.streamTextContent(params);
|
958
|
+
return new Promise(function (resolve, reject) {
|
959
|
+
function pump() {
|
960
|
+
reader.read().then(function (_ref5) {
|
961
|
+
var _textContent$items;
|
962
|
+
|
963
|
+
var value = _ref5.value,
|
964
|
+
done = _ref5.done;
|
965
|
+
|
966
|
+
if (done) {
|
967
|
+
resolve(textContent);
|
968
|
+
return;
|
969
|
+
}
|
970
|
+
|
971
|
+
Object.assign(textContent.styles, value.styles);
|
972
|
+
|
973
|
+
(_textContent$items = textContent.items).push.apply(_textContent$items, _toConsumableArray(value.items));
|
974
|
+
|
975
|
+
pump();
|
976
|
+
}, reject);
|
977
|
+
}
|
978
|
+
|
979
|
+
var reader = readableStream.getReader();
|
980
|
+
var textContent = {
|
981
|
+
items: [],
|
982
|
+
styles: Object.create(null)
|
983
|
+
};
|
984
|
+
pump();
|
985
|
+
});
|
986
|
+
}
|
987
|
+
}, {
|
988
|
+
key: "_destroy",
|
989
|
+
value: function _destroy() {
|
990
|
+
var _this6 = this;
|
991
|
+
|
992
|
+
this.destroyed = true;
|
993
|
+
this._transport.pageCache[this.pageIndex] = null;
|
994
|
+
var waitOn = [];
|
995
|
+
Object.keys(this.intentStates).forEach(function (intent) {
|
996
|
+
var intentState = _this6.intentStates[intent];
|
997
|
+
|
998
|
+
_this6._abortOperatorList({
|
999
|
+
intentState: intentState,
|
1000
|
+
reason: new Error('Page was destroyed.'),
|
1001
|
+
force: true
|
1002
|
+
});
|
1003
|
+
|
1004
|
+
if (intent === 'oplist') {
|
1005
|
+
return;
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
intentState.renderTasks.forEach(function (renderTask) {
|
1009
|
+
var renderCompleted = renderTask.capability.promise["catch"](function () {});
|
1010
|
+
waitOn.push(renderCompleted);
|
1011
|
+
renderTask.cancel();
|
1012
|
+
});
|
1013
|
+
});
|
1014
|
+
this.objs.clear();
|
1015
|
+
this.annotationsPromise = null;
|
1016
|
+
this.pendingCleanup = false;
|
1017
|
+
return Promise.all(waitOn);
|
1018
|
+
}
|
1019
|
+
}, {
|
1020
|
+
key: "cleanup",
|
1021
|
+
value: function cleanup() {
|
1022
|
+
var resetStats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
1023
|
+
this.pendingCleanup = true;
|
1024
|
+
|
1025
|
+
this._tryCleanup(resetStats);
|
1026
|
+
}
|
1027
|
+
}, {
|
1028
|
+
key: "_tryCleanup",
|
1029
|
+
value: function _tryCleanup() {
|
1030
|
+
var _this7 = this;
|
1031
|
+
|
1032
|
+
var resetStats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
1033
|
+
|
1034
|
+
if (!this.pendingCleanup || Object.keys(this.intentStates).some(function (intent) {
|
1035
|
+
var intentState = _this7.intentStates[intent];
|
1036
|
+
return intentState.renderTasks.length !== 0 || !intentState.operatorList.lastChunk;
|
1037
|
+
})) {
|
1038
|
+
return;
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
Object.keys(this.intentStates).forEach(function (intent) {
|
1042
|
+
delete _this7.intentStates[intent];
|
1043
|
+
});
|
1044
|
+
this.objs.clear();
|
1045
|
+
this.annotationsPromise = null;
|
1046
|
+
|
1047
|
+
if (resetStats && this._stats instanceof _display_utils.StatTimer) {
|
1048
|
+
this._stats = new _display_utils.StatTimer();
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
this.pendingCleanup = false;
|
1052
|
+
}
|
1053
|
+
}, {
|
1054
|
+
key: "_startRenderPage",
|
1055
|
+
value: function _startRenderPage(transparency, intent) {
|
1056
|
+
var intentState = this.intentStates[intent];
|
1057
|
+
|
1058
|
+
if (!intentState) {
|
1059
|
+
return;
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
this._stats.timeEnd('Page Request');
|
1063
|
+
|
1064
|
+
if (intentState.displayReadyCapability) {
|
1065
|
+
intentState.displayReadyCapability.resolve(transparency);
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
}, {
|
1069
|
+
key: "_renderPageChunk",
|
1070
|
+
value: function _renderPageChunk(operatorListChunk, intentState) {
|
1071
|
+
for (var i = 0, ii = operatorListChunk.length; i < ii; i++) {
|
1072
|
+
intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);
|
1073
|
+
intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
intentState.operatorList.lastChunk = operatorListChunk.lastChunk;
|
1077
|
+
|
1078
|
+
for (var _i = 0; _i < intentState.renderTasks.length; _i++) {
|
1079
|
+
intentState.renderTasks[_i].operatorListChanged();
|
1080
|
+
}
|
1081
|
+
|
1082
|
+
if (operatorListChunk.lastChunk) {
|
1083
|
+
this._tryCleanup();
|
1084
|
+
}
|
1085
|
+
}
|
1086
|
+
}, {
|
1087
|
+
key: "_pumpOperatorList",
|
1088
|
+
value: function _pumpOperatorList(args) {
|
1089
|
+
var _this8 = this;
|
1090
|
+
|
1091
|
+
(0, _util.assert)(args.intent, 'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');
|
1092
|
+
|
1093
|
+
var readableStream = this._transport.messageHandler.sendWithStream('GetOperatorList', args);
|
1094
|
+
|
1095
|
+
var reader = readableStream.getReader();
|
1096
|
+
var intentState = this.intentStates[args.intent];
|
1097
|
+
intentState.streamReader = reader;
|
1098
|
+
|
1099
|
+
var pump = function pump() {
|
1100
|
+
reader.read().then(function (_ref6) {
|
1101
|
+
var value = _ref6.value,
|
1102
|
+
done = _ref6.done;
|
1103
|
+
|
1104
|
+
if (done) {
|
1105
|
+
intentState.streamReader = null;
|
1106
|
+
return;
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
if (_this8._transport.destroyed) {
|
1110
|
+
return;
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
_this8._renderPageChunk(value, intentState);
|
1114
|
+
|
1115
|
+
pump();
|
1116
|
+
}, function (reason) {
|
1117
|
+
intentState.streamReader = null;
|
1118
|
+
|
1119
|
+
if (_this8._transport.destroyed) {
|
1120
|
+
return;
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
if (intentState.operatorList) {
|
1124
|
+
intentState.operatorList.lastChunk = true;
|
1125
|
+
|
1126
|
+
for (var i = 0; i < intentState.renderTasks.length; i++) {
|
1127
|
+
intentState.renderTasks[i].operatorListChanged();
|
1128
|
+
}
|
1129
|
+
|
1130
|
+
_this8._tryCleanup();
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
if (intentState.displayReadyCapability) {
|
1134
|
+
intentState.displayReadyCapability.reject(reason);
|
1135
|
+
} else if (intentState.opListReadCapability) {
|
1136
|
+
intentState.opListReadCapability.reject(reason);
|
1137
|
+
} else {
|
1138
|
+
throw reason;
|
1139
|
+
}
|
1140
|
+
});
|
1141
|
+
};
|
1142
|
+
|
1143
|
+
pump();
|
1144
|
+
}
|
1145
|
+
}, {
|
1146
|
+
key: "_abortOperatorList",
|
1147
|
+
value: function _abortOperatorList(_ref7) {
|
1148
|
+
var _this9 = this;
|
1149
|
+
|
1150
|
+
var intentState = _ref7.intentState,
|
1151
|
+
reason = _ref7.reason,
|
1152
|
+
_ref7$force = _ref7.force,
|
1153
|
+
force = _ref7$force === void 0 ? false : _ref7$force;
|
1154
|
+
(0, _util.assert)(reason instanceof Error, 'PDFPageProxy._abortOperatorList: Expected "reason" argument.');
|
1155
|
+
|
1156
|
+
if (!intentState.streamReader) {
|
1157
|
+
return;
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
if (!force) {
|
1161
|
+
if (intentState.renderTasks.length !== 0) {
|
1162
|
+
return;
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
if (reason instanceof _display_utils.RenderingCancelledException) {
|
1166
|
+
intentState.streamReaderCancelTimeout = setTimeout(function () {
|
1167
|
+
_this9._abortOperatorList({
|
1168
|
+
intentState: intentState,
|
1169
|
+
reason: reason,
|
1170
|
+
force: true
|
1171
|
+
});
|
1172
|
+
|
1173
|
+
intentState.streamReaderCancelTimeout = null;
|
1174
|
+
}, RENDERING_CANCELLED_TIMEOUT);
|
1175
|
+
return;
|
1176
|
+
}
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
intentState.streamReader.cancel(new _util.AbortException(reason && reason.message));
|
1180
|
+
intentState.streamReader = null;
|
1181
|
+
|
1182
|
+
if (this._transport.destroyed) {
|
1183
|
+
return;
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
Object.keys(this.intentStates).some(function (intent) {
|
1187
|
+
if (_this9.intentStates[intent] === intentState) {
|
1188
|
+
delete _this9.intentStates[intent];
|
1189
|
+
return true;
|
1190
|
+
}
|
1191
|
+
|
1192
|
+
return false;
|
1193
|
+
});
|
1194
|
+
this.cleanup();
|
1195
|
+
}
|
1196
|
+
}, {
|
1197
|
+
key: "pageNumber",
|
1198
|
+
get: function get() {
|
1199
|
+
return this.pageIndex + 1;
|
1200
|
+
}
|
1201
|
+
}, {
|
1202
|
+
key: "rotate",
|
1203
|
+
get: function get() {
|
1204
|
+
return this._pageInfo.rotate;
|
1205
|
+
}
|
1206
|
+
}, {
|
1207
|
+
key: "ref",
|
1208
|
+
get: function get() {
|
1209
|
+
return this._pageInfo.ref;
|
1210
|
+
}
|
1211
|
+
}, {
|
1212
|
+
key: "userUnit",
|
1213
|
+
get: function get() {
|
1214
|
+
return this._pageInfo.userUnit;
|
1215
|
+
}
|
1216
|
+
}, {
|
1217
|
+
key: "view",
|
1218
|
+
get: function get() {
|
1219
|
+
return this._pageInfo.view;
|
1220
|
+
}
|
1221
|
+
}, {
|
1222
|
+
key: "stats",
|
1223
|
+
get: function get() {
|
1224
|
+
return this._stats instanceof _display_utils.StatTimer ? this._stats : null;
|
1225
|
+
}
|
1226
|
+
}]);
|
1227
|
+
|
1228
|
+
return PDFPageProxy;
|
1229
|
+
}();
|
1230
|
+
|
1231
|
+
exports.PDFPageProxy = PDFPageProxy;
|
1232
|
+
|
1233
|
+
var LoopbackPort =
|
1234
|
+
/*#__PURE__*/
|
1235
|
+
function () {
|
1236
|
+
function LoopbackPort() {
|
1237
|
+
var defer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
1238
|
+
|
1239
|
+
_classCallCheck(this, LoopbackPort);
|
1240
|
+
|
1241
|
+
this._listeners = [];
|
1242
|
+
this._defer = defer;
|
1243
|
+
this._deferred = Promise.resolve(undefined);
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
_createClass(LoopbackPort, [{
|
1247
|
+
key: "postMessage",
|
1248
|
+
value: function postMessage(obj, transfers) {
|
1249
|
+
var _this10 = this;
|
1250
|
+
|
1251
|
+
function cloneValue(value) {
|
1252
|
+
if (_typeof(value) !== 'object' || value === null) {
|
1253
|
+
return value;
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
if (cloned.has(value)) {
|
1257
|
+
return cloned.get(value);
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
var buffer, result;
|
1261
|
+
|
1262
|
+
if ((buffer = value.buffer) && (0, _util.isArrayBuffer)(buffer)) {
|
1263
|
+
var transferable = transfers && transfers.includes(buffer);
|
1264
|
+
|
1265
|
+
if (value === buffer) {
|
1266
|
+
result = value;
|
1267
|
+
} else if (transferable) {
|
1268
|
+
result = new value.constructor(buffer, value.byteOffset, value.byteLength);
|
1269
|
+
} else {
|
1270
|
+
result = new value.constructor(value);
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
cloned.set(value, result);
|
1274
|
+
return result;
|
1275
|
+
}
|
1276
|
+
|
1277
|
+
result = Array.isArray(value) ? [] : {};
|
1278
|
+
cloned.set(value, result);
|
1279
|
+
|
1280
|
+
for (var i in value) {
|
1281
|
+
var desc = void 0,
|
1282
|
+
p = value;
|
1283
|
+
|
1284
|
+
while (!(desc = Object.getOwnPropertyDescriptor(p, i))) {
|
1285
|
+
p = Object.getPrototypeOf(p);
|
1286
|
+
}
|
1287
|
+
|
1288
|
+
if (typeof desc.value === 'undefined') {
|
1289
|
+
continue;
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
if (typeof desc.value === 'function') {
|
1293
|
+
if (value.hasOwnProperty && value.hasOwnProperty(i)) {
|
1294
|
+
throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(value[i]));
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
continue;
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
result[i] = cloneValue(desc.value);
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
return result;
|
1304
|
+
}
|
1305
|
+
|
1306
|
+
if (!this._defer) {
|
1307
|
+
this._listeners.forEach(function (listener) {
|
1308
|
+
listener.call(_this10, {
|
1309
|
+
data: obj
|
1310
|
+
});
|
1311
|
+
});
|
1312
|
+
|
1313
|
+
return;
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
var cloned = new WeakMap();
|
1317
|
+
var e = {
|
1318
|
+
data: cloneValue(obj)
|
1319
|
+
};
|
1320
|
+
|
1321
|
+
this._deferred.then(function () {
|
1322
|
+
_this10._listeners.forEach(function (listener) {
|
1323
|
+
listener.call(_this10, e);
|
1324
|
+
});
|
1325
|
+
});
|
1326
|
+
}
|
1327
|
+
}, {
|
1328
|
+
key: "addEventListener",
|
1329
|
+
value: function addEventListener(name, listener) {
|
1330
|
+
this._listeners.push(listener);
|
1331
|
+
}
|
1332
|
+
}, {
|
1333
|
+
key: "removeEventListener",
|
1334
|
+
value: function removeEventListener(name, listener) {
|
1335
|
+
var i = this._listeners.indexOf(listener);
|
1336
|
+
|
1337
|
+
this._listeners.splice(i, 1);
|
1338
|
+
}
|
1339
|
+
}, {
|
1340
|
+
key: "terminate",
|
1341
|
+
value: function terminate() {
|
1342
|
+
this._listeners.length = 0;
|
1343
|
+
}
|
1344
|
+
}]);
|
1345
|
+
|
1346
|
+
return LoopbackPort;
|
1347
|
+
}();
|
1348
|
+
|
1349
|
+
exports.LoopbackPort = LoopbackPort;
|
1350
|
+
|
1351
|
+
var PDFWorker = function PDFWorkerClosure() {
|
1352
|
+
var pdfWorkerPorts = new WeakMap();
|
1353
|
+
var nextFakeWorkerId = 0;
|
1354
|
+
var fakeWorkerFilesLoadedCapability;
|
1355
|
+
|
1356
|
+
function _getWorkerSrc() {
|
1357
|
+
if (_worker_options.GlobalWorkerOptions.workerSrc) {
|
1358
|
+
return _worker_options.GlobalWorkerOptions.workerSrc;
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
if (typeof fallbackWorkerSrc !== 'undefined') {
|
1362
|
+
return fallbackWorkerSrc;
|
1363
|
+
}
|
1364
|
+
|
1365
|
+
throw new Error('No "GlobalWorkerOptions.workerSrc" specified.');
|
1366
|
+
}
|
1367
|
+
|
1368
|
+
function getMainThreadWorkerMessageHandler() {
|
1369
|
+
try {
|
1370
|
+
if (typeof window !== 'undefined') {
|
1371
|
+
return window.pdfjsWorker && window.pdfjsWorker.WorkerMessageHandler;
|
1372
|
+
}
|
1373
|
+
} catch (ex) {}
|
1374
|
+
|
1375
|
+
return null;
|
1376
|
+
}
|
1377
|
+
|
1378
|
+
function setupFakeWorkerGlobal() {
|
1379
|
+
if (fakeWorkerFilesLoadedCapability) {
|
1380
|
+
return fakeWorkerFilesLoadedCapability.promise;
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
fakeWorkerFilesLoadedCapability = (0, _util.createPromiseCapability)();
|
1384
|
+
var mainWorkerMessageHandler = getMainThreadWorkerMessageHandler();
|
1385
|
+
|
1386
|
+
if (mainWorkerMessageHandler) {
|
1387
|
+
fakeWorkerFilesLoadedCapability.resolve(mainWorkerMessageHandler);
|
1388
|
+
return fakeWorkerFilesLoadedCapability.promise;
|
1389
|
+
}
|
1390
|
+
|
1391
|
+
var loader = fakeWorkerFilesLoader || function () {
|
1392
|
+
return (0, _display_utils.loadScript)(_getWorkerSrc()).then(function () {
|
1393
|
+
return window.pdfjsWorker.WorkerMessageHandler;
|
1394
|
+
});
|
1395
|
+
};
|
1396
|
+
|
1397
|
+
loader().then(fakeWorkerFilesLoadedCapability.resolve, fakeWorkerFilesLoadedCapability.reject);
|
1398
|
+
return fakeWorkerFilesLoadedCapability.promise;
|
1399
|
+
}
|
1400
|
+
|
1401
|
+
function createCDNWrapper(url) {
|
1402
|
+
var wrapper = 'importScripts(\'' + url + '\');';
|
1403
|
+
return URL.createObjectURL(new Blob([wrapper]));
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
var PDFWorker =
|
1407
|
+
/*#__PURE__*/
|
1408
|
+
function () {
|
1409
|
+
function PDFWorker() {
|
1410
|
+
var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
1411
|
+
_ref8$name = _ref8.name,
|
1412
|
+
name = _ref8$name === void 0 ? null : _ref8$name,
|
1413
|
+
_ref8$port = _ref8.port,
|
1414
|
+
port = _ref8$port === void 0 ? null : _ref8$port,
|
1415
|
+
_ref8$verbosity = _ref8.verbosity,
|
1416
|
+
verbosity = _ref8$verbosity === void 0 ? (0, _util.getVerbosityLevel)() : _ref8$verbosity;
|
1417
|
+
|
1418
|
+
_classCallCheck(this, PDFWorker);
|
1419
|
+
|
1420
|
+
if (port && pdfWorkerPorts.has(port)) {
|
1421
|
+
throw new Error('Cannot use more than one PDFWorker per port');
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
this.name = name;
|
1425
|
+
this.destroyed = false;
|
1426
|
+
this.postMessageTransfers = true;
|
1427
|
+
this.verbosity = verbosity;
|
1428
|
+
this._readyCapability = (0, _util.createPromiseCapability)();
|
1429
|
+
this._port = null;
|
1430
|
+
this._webWorker = null;
|
1431
|
+
this._messageHandler = null;
|
1432
|
+
|
1433
|
+
if (port) {
|
1434
|
+
pdfWorkerPorts.set(port, this);
|
1435
|
+
|
1436
|
+
this._initializeFromPort(port);
|
1437
|
+
|
1438
|
+
return;
|
1439
|
+
}
|
1440
|
+
|
1441
|
+
this._initialize();
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
_createClass(PDFWorker, [{
|
1445
|
+
key: "_initializeFromPort",
|
1446
|
+
value: function _initializeFromPort(port) {
|
1447
|
+
this._port = port;
|
1448
|
+
this._messageHandler = new _message_handler.MessageHandler('main', 'worker', port);
|
1449
|
+
|
1450
|
+
this._messageHandler.on('ready', function () {});
|
1451
|
+
|
1452
|
+
this._readyCapability.resolve();
|
1453
|
+
}
|
1454
|
+
}, {
|
1455
|
+
key: "_initialize",
|
1456
|
+
value: function _initialize() {
|
1457
|
+
var _this11 = this;
|
1458
|
+
|
1459
|
+
if (typeof Worker !== 'undefined' && !isWorkerDisabled && !getMainThreadWorkerMessageHandler()) {
|
1460
|
+
var workerSrc = _getWorkerSrc();
|
1461
|
+
|
1462
|
+
try {
|
1463
|
+
if (!(0, _util.isSameOrigin)(window.location.href, workerSrc)) {
|
1464
|
+
workerSrc = createCDNWrapper(new URL(workerSrc, window.location).href);
|
1465
|
+
}
|
1466
|
+
|
1467
|
+
var worker = new Worker(workerSrc);
|
1468
|
+
var messageHandler = new _message_handler.MessageHandler('main', 'worker', worker);
|
1469
|
+
|
1470
|
+
var terminateEarly = function terminateEarly() {
|
1471
|
+
worker.removeEventListener('error', onWorkerError);
|
1472
|
+
messageHandler.destroy();
|
1473
|
+
worker.terminate();
|
1474
|
+
|
1475
|
+
if (_this11.destroyed) {
|
1476
|
+
_this11._readyCapability.reject(new Error('Worker was destroyed'));
|
1477
|
+
} else {
|
1478
|
+
_this11._setupFakeWorker();
|
1479
|
+
}
|
1480
|
+
};
|
1481
|
+
|
1482
|
+
var onWorkerError = function onWorkerError() {
|
1483
|
+
if (!_this11._webWorker) {
|
1484
|
+
terminateEarly();
|
1485
|
+
}
|
1486
|
+
};
|
1487
|
+
|
1488
|
+
worker.addEventListener('error', onWorkerError);
|
1489
|
+
messageHandler.on('test', function (data) {
|
1490
|
+
worker.removeEventListener('error', onWorkerError);
|
1491
|
+
|
1492
|
+
if (_this11.destroyed) {
|
1493
|
+
terminateEarly();
|
1494
|
+
return;
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
if (data) {
|
1498
|
+
_this11._messageHandler = messageHandler;
|
1499
|
+
_this11._port = worker;
|
1500
|
+
_this11._webWorker = worker;
|
1501
|
+
|
1502
|
+
if (!data.supportTransfers) {
|
1503
|
+
_this11.postMessageTransfers = false;
|
1504
|
+
}
|
1505
|
+
|
1506
|
+
_this11._readyCapability.resolve();
|
1507
|
+
|
1508
|
+
messageHandler.send('configure', {
|
1509
|
+
verbosity: _this11.verbosity
|
1510
|
+
});
|
1511
|
+
} else {
|
1512
|
+
_this11._setupFakeWorker();
|
1513
|
+
|
1514
|
+
messageHandler.destroy();
|
1515
|
+
worker.terminate();
|
1516
|
+
}
|
1517
|
+
});
|
1518
|
+
messageHandler.on('ready', function (data) {
|
1519
|
+
worker.removeEventListener('error', onWorkerError);
|
1520
|
+
|
1521
|
+
if (_this11.destroyed) {
|
1522
|
+
terminateEarly();
|
1523
|
+
return;
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
try {
|
1527
|
+
sendTest();
|
1528
|
+
} catch (e) {
|
1529
|
+
_this11._setupFakeWorker();
|
1530
|
+
}
|
1531
|
+
});
|
1532
|
+
|
1533
|
+
var sendTest = function sendTest() {
|
1534
|
+
var testObj = new Uint8Array([_this11.postMessageTransfers ? 255 : 0]);
|
1535
|
+
|
1536
|
+
try {
|
1537
|
+
messageHandler.send('test', testObj, [testObj.buffer]);
|
1538
|
+
} catch (ex) {
|
1539
|
+
(0, _util.warn)('Cannot use postMessage transfers.');
|
1540
|
+
testObj[0] = 0;
|
1541
|
+
messageHandler.send('test', testObj);
|
1542
|
+
}
|
1543
|
+
};
|
1544
|
+
|
1545
|
+
sendTest();
|
1546
|
+
return;
|
1547
|
+
} catch (e) {
|
1548
|
+
(0, _util.info)('The worker has been disabled.');
|
1549
|
+
}
|
1550
|
+
}
|
1551
|
+
|
1552
|
+
this._setupFakeWorker();
|
1553
|
+
}
|
1554
|
+
}, {
|
1555
|
+
key: "_setupFakeWorker",
|
1556
|
+
value: function _setupFakeWorker() {
|
1557
|
+
var _this12 = this;
|
1558
|
+
|
1559
|
+
if (!isWorkerDisabled) {
|
1560
|
+
(0, _util.warn)('Setting up fake worker.');
|
1561
|
+
isWorkerDisabled = true;
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
setupFakeWorkerGlobal().then(function (WorkerMessageHandler) {
|
1565
|
+
if (_this12.destroyed) {
|
1566
|
+
_this12._readyCapability.reject(new Error('Worker was destroyed'));
|
1567
|
+
|
1568
|
+
return;
|
1569
|
+
}
|
1570
|
+
|
1571
|
+
var port = new LoopbackPort();
|
1572
|
+
_this12._port = port;
|
1573
|
+
var id = 'fake' + nextFakeWorkerId++;
|
1574
|
+
var workerHandler = new _message_handler.MessageHandler(id + '_worker', id, port);
|
1575
|
+
WorkerMessageHandler.setup(workerHandler, port);
|
1576
|
+
var messageHandler = new _message_handler.MessageHandler(id, id + '_worker', port);
|
1577
|
+
_this12._messageHandler = messageHandler;
|
1578
|
+
|
1579
|
+
_this12._readyCapability.resolve();
|
1580
|
+
})["catch"](function (reason) {
|
1581
|
+
_this12._readyCapability.reject(new Error("Setting up fake worker failed: \"".concat(reason.message, "\".")));
|
1582
|
+
});
|
1583
|
+
}
|
1584
|
+
}, {
|
1585
|
+
key: "destroy",
|
1586
|
+
value: function destroy() {
|
1587
|
+
this.destroyed = true;
|
1588
|
+
|
1589
|
+
if (this._webWorker) {
|
1590
|
+
this._webWorker.terminate();
|
1591
|
+
|
1592
|
+
this._webWorker = null;
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
pdfWorkerPorts["delete"](this._port);
|
1596
|
+
this._port = null;
|
1597
|
+
|
1598
|
+
if (this._messageHandler) {
|
1599
|
+
this._messageHandler.destroy();
|
1600
|
+
|
1601
|
+
this._messageHandler = null;
|
1602
|
+
}
|
1603
|
+
}
|
1604
|
+
}, {
|
1605
|
+
key: "promise",
|
1606
|
+
get: function get() {
|
1607
|
+
return this._readyCapability.promise;
|
1608
|
+
}
|
1609
|
+
}, {
|
1610
|
+
key: "port",
|
1611
|
+
get: function get() {
|
1612
|
+
return this._port;
|
1613
|
+
}
|
1614
|
+
}, {
|
1615
|
+
key: "messageHandler",
|
1616
|
+
get: function get() {
|
1617
|
+
return this._messageHandler;
|
1618
|
+
}
|
1619
|
+
}], [{
|
1620
|
+
key: "fromPort",
|
1621
|
+
value: function fromPort(params) {
|
1622
|
+
if (!params || !params.port) {
|
1623
|
+
throw new Error('PDFWorker.fromPort - invalid method signature.');
|
1624
|
+
}
|
1625
|
+
|
1626
|
+
if (pdfWorkerPorts.has(params.port)) {
|
1627
|
+
return pdfWorkerPorts.get(params.port);
|
1628
|
+
}
|
1629
|
+
|
1630
|
+
return new PDFWorker(params);
|
1631
|
+
}
|
1632
|
+
}, {
|
1633
|
+
key: "getWorkerSrc",
|
1634
|
+
value: function getWorkerSrc() {
|
1635
|
+
return _getWorkerSrc();
|
1636
|
+
}
|
1637
|
+
}]);
|
1638
|
+
|
1639
|
+
return PDFWorker;
|
1640
|
+
}();
|
1641
|
+
|
1642
|
+
return PDFWorker;
|
1643
|
+
}();
|
1644
|
+
|
1645
|
+
exports.PDFWorker = PDFWorker;
|
1646
|
+
|
1647
|
+
var WorkerTransport =
|
1648
|
+
/*#__PURE__*/
|
1649
|
+
function () {
|
1650
|
+
function WorkerTransport(messageHandler, loadingTask, networkStream, params) {
|
1651
|
+
_classCallCheck(this, WorkerTransport);
|
1652
|
+
|
1653
|
+
this.messageHandler = messageHandler;
|
1654
|
+
this.loadingTask = loadingTask;
|
1655
|
+
this.commonObjs = new PDFObjects();
|
1656
|
+
this.fontLoader = new _font_loader.FontLoader({
|
1657
|
+
docId: loadingTask.docId,
|
1658
|
+
onUnsupportedFeature: this._onUnsupportedFeature.bind(this)
|
1659
|
+
});
|
1660
|
+
this._params = params;
|
1661
|
+
this.CMapReaderFactory = new params.CMapReaderFactory({
|
1662
|
+
baseUrl: params.cMapUrl,
|
1663
|
+
isCompressed: params.cMapPacked
|
1664
|
+
});
|
1665
|
+
this.destroyed = false;
|
1666
|
+
this.destroyCapability = null;
|
1667
|
+
this._passwordCapability = null;
|
1668
|
+
this._networkStream = networkStream;
|
1669
|
+
this._fullReader = null;
|
1670
|
+
this._lastProgress = null;
|
1671
|
+
this.pageCache = [];
|
1672
|
+
this.pagePromises = [];
|
1673
|
+
this.downloadInfoCapability = (0, _util.createPromiseCapability)();
|
1674
|
+
this.setupMessageHandler();
|
1675
|
+
}
|
1676
|
+
|
1677
|
+
_createClass(WorkerTransport, [{
|
1678
|
+
key: "destroy",
|
1679
|
+
value: function destroy() {
|
1680
|
+
var _this13 = this;
|
1681
|
+
|
1682
|
+
if (this.destroyCapability) {
|
1683
|
+
return this.destroyCapability.promise;
|
1684
|
+
}
|
1685
|
+
|
1686
|
+
this.destroyed = true;
|
1687
|
+
this.destroyCapability = (0, _util.createPromiseCapability)();
|
1688
|
+
|
1689
|
+
if (this._passwordCapability) {
|
1690
|
+
this._passwordCapability.reject(new Error('Worker was destroyed during onPassword callback'));
|
1691
|
+
}
|
1692
|
+
|
1693
|
+
var waitOn = [];
|
1694
|
+
this.pageCache.forEach(function (page) {
|
1695
|
+
if (page) {
|
1696
|
+
waitOn.push(page._destroy());
|
1697
|
+
}
|
1698
|
+
});
|
1699
|
+
this.pageCache.length = 0;
|
1700
|
+
this.pagePromises.length = 0;
|
1701
|
+
var terminated = this.messageHandler.sendWithPromise('Terminate', null);
|
1702
|
+
waitOn.push(terminated);
|
1703
|
+
Promise.all(waitOn).then(function () {
|
1704
|
+
_this13.fontLoader.clear();
|
1705
|
+
|
1706
|
+
if (_this13._networkStream) {
|
1707
|
+
_this13._networkStream.cancelAllRequests(new _util.AbortException('Worker was terminated.'));
|
1708
|
+
}
|
1709
|
+
|
1710
|
+
if (_this13.messageHandler) {
|
1711
|
+
_this13.messageHandler.destroy();
|
1712
|
+
|
1713
|
+
_this13.messageHandler = null;
|
1714
|
+
}
|
1715
|
+
|
1716
|
+
_this13.destroyCapability.resolve();
|
1717
|
+
}, this.destroyCapability.reject);
|
1718
|
+
return this.destroyCapability.promise;
|
1719
|
+
}
|
1720
|
+
}, {
|
1721
|
+
key: "setupMessageHandler",
|
1722
|
+
value: function setupMessageHandler() {
|
1723
|
+
var _this14 = this;
|
1724
|
+
|
1725
|
+
var messageHandler = this.messageHandler,
|
1726
|
+
loadingTask = this.loadingTask;
|
1727
|
+
messageHandler.on('GetReader', function (data, sink) {
|
1728
|
+
(0, _util.assert)(_this14._networkStream);
|
1729
|
+
_this14._fullReader = _this14._networkStream.getFullReader();
|
1730
|
+
|
1731
|
+
_this14._fullReader.onProgress = function (evt) {
|
1732
|
+
_this14._lastProgress = {
|
1733
|
+
loaded: evt.loaded,
|
1734
|
+
total: evt.total
|
1735
|
+
};
|
1736
|
+
};
|
1737
|
+
|
1738
|
+
sink.onPull = function () {
|
1739
|
+
_this14._fullReader.read().then(function (_ref9) {
|
1740
|
+
var value = _ref9.value,
|
1741
|
+
done = _ref9.done;
|
1742
|
+
|
1743
|
+
if (done) {
|
1744
|
+
sink.close();
|
1745
|
+
return;
|
1746
|
+
}
|
1747
|
+
|
1748
|
+
(0, _util.assert)((0, _util.isArrayBuffer)(value));
|
1749
|
+
sink.enqueue(new Uint8Array(value), 1, [value]);
|
1750
|
+
})["catch"](function (reason) {
|
1751
|
+
sink.error(reason);
|
1752
|
+
});
|
1753
|
+
};
|
1754
|
+
|
1755
|
+
sink.onCancel = function (reason) {
|
1756
|
+
_this14._fullReader.cancel(reason);
|
1757
|
+
};
|
1758
|
+
});
|
1759
|
+
messageHandler.on('ReaderHeadersReady', function (data) {
|
1760
|
+
var headersCapability = (0, _util.createPromiseCapability)();
|
1761
|
+
var fullReader = _this14._fullReader;
|
1762
|
+
fullReader.headersReady.then(function () {
|
1763
|
+
if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) {
|
1764
|
+
if (_this14._lastProgress && loadingTask.onProgress) {
|
1765
|
+
loadingTask.onProgress(_this14._lastProgress);
|
1766
|
+
}
|
1767
|
+
|
1768
|
+
fullReader.onProgress = function (evt) {
|
1769
|
+
if (loadingTask.onProgress) {
|
1770
|
+
loadingTask.onProgress({
|
1771
|
+
loaded: evt.loaded,
|
1772
|
+
total: evt.total
|
1773
|
+
});
|
1774
|
+
}
|
1775
|
+
};
|
1776
|
+
}
|
1777
|
+
|
1778
|
+
headersCapability.resolve({
|
1779
|
+
isStreamingSupported: fullReader.isStreamingSupported,
|
1780
|
+
isRangeSupported: fullReader.isRangeSupported,
|
1781
|
+
contentLength: fullReader.contentLength
|
1782
|
+
});
|
1783
|
+
}, headersCapability.reject);
|
1784
|
+
return headersCapability.promise;
|
1785
|
+
});
|
1786
|
+
messageHandler.on('GetRangeReader', function (data, sink) {
|
1787
|
+
(0, _util.assert)(_this14._networkStream);
|
1788
|
+
|
1789
|
+
var rangeReader = _this14._networkStream.getRangeReader(data.begin, data.end);
|
1790
|
+
|
1791
|
+
if (!rangeReader) {
|
1792
|
+
sink.close();
|
1793
|
+
return;
|
1794
|
+
}
|
1795
|
+
|
1796
|
+
sink.onPull = function () {
|
1797
|
+
rangeReader.read().then(function (_ref10) {
|
1798
|
+
var value = _ref10.value,
|
1799
|
+
done = _ref10.done;
|
1800
|
+
|
1801
|
+
if (done) {
|
1802
|
+
sink.close();
|
1803
|
+
return;
|
1804
|
+
}
|
1805
|
+
|
1806
|
+
(0, _util.assert)((0, _util.isArrayBuffer)(value));
|
1807
|
+
sink.enqueue(new Uint8Array(value), 1, [value]);
|
1808
|
+
})["catch"](function (reason) {
|
1809
|
+
sink.error(reason);
|
1810
|
+
});
|
1811
|
+
};
|
1812
|
+
|
1813
|
+
sink.onCancel = function (reason) {
|
1814
|
+
rangeReader.cancel(reason);
|
1815
|
+
};
|
1816
|
+
});
|
1817
|
+
messageHandler.on('GetDoc', function (_ref11) {
|
1818
|
+
var pdfInfo = _ref11.pdfInfo;
|
1819
|
+
_this14._numPages = pdfInfo.numPages;
|
1820
|
+
|
1821
|
+
loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, _this14));
|
1822
|
+
});
|
1823
|
+
messageHandler.on('PasswordRequest', function (exception) {
|
1824
|
+
_this14._passwordCapability = (0, _util.createPromiseCapability)();
|
1825
|
+
|
1826
|
+
if (loadingTask.onPassword) {
|
1827
|
+
var updatePassword = function updatePassword(password) {
|
1828
|
+
_this14._passwordCapability.resolve({
|
1829
|
+
password: password
|
1830
|
+
});
|
1831
|
+
};
|
1832
|
+
|
1833
|
+
try {
|
1834
|
+
loadingTask.onPassword(updatePassword, exception.code);
|
1835
|
+
} catch (ex) {
|
1836
|
+
_this14._passwordCapability.reject(ex);
|
1837
|
+
}
|
1838
|
+
} else {
|
1839
|
+
_this14._passwordCapability.reject(new _util.PasswordException(exception.message, exception.code));
|
1840
|
+
}
|
1841
|
+
|
1842
|
+
return _this14._passwordCapability.promise;
|
1843
|
+
});
|
1844
|
+
messageHandler.on('PasswordException', function (exception) {
|
1845
|
+
loadingTask._capability.reject(new _util.PasswordException(exception.message, exception.code));
|
1846
|
+
});
|
1847
|
+
messageHandler.on('InvalidPDF', function (exception) {
|
1848
|
+
loadingTask._capability.reject(new _util.InvalidPDFException(exception.message));
|
1849
|
+
});
|
1850
|
+
messageHandler.on('MissingPDF', function (exception) {
|
1851
|
+
loadingTask._capability.reject(new _util.MissingPDFException(exception.message));
|
1852
|
+
});
|
1853
|
+
messageHandler.on('UnexpectedResponse', function (exception) {
|
1854
|
+
loadingTask._capability.reject(new _util.UnexpectedResponseException(exception.message, exception.status));
|
1855
|
+
});
|
1856
|
+
messageHandler.on('UnknownError', function (exception) {
|
1857
|
+
loadingTask._capability.reject(new _util.UnknownErrorException(exception.message, exception.details));
|
1858
|
+
});
|
1859
|
+
messageHandler.on('DataLoaded', function (data) {
|
1860
|
+
if (loadingTask.onProgress) {
|
1861
|
+
loadingTask.onProgress({
|
1862
|
+
loaded: data.length,
|
1863
|
+
total: data.length
|
1864
|
+
});
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
_this14.downloadInfoCapability.resolve(data);
|
1868
|
+
});
|
1869
|
+
messageHandler.on('StartRenderPage', function (data) {
|
1870
|
+
if (_this14.destroyed) {
|
1871
|
+
return;
|
1872
|
+
}
|
1873
|
+
|
1874
|
+
var page = _this14.pageCache[data.pageIndex];
|
1875
|
+
|
1876
|
+
page._startRenderPage(data.transparency, data.intent);
|
1877
|
+
});
|
1878
|
+
messageHandler.on('commonobj', function (data) {
|
1879
|
+
if (_this14.destroyed) {
|
1880
|
+
return;
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
var _data = _slicedToArray(data, 3),
|
1884
|
+
id = _data[0],
|
1885
|
+
type = _data[1],
|
1886
|
+
exportedData = _data[2];
|
1887
|
+
|
1888
|
+
if (_this14.commonObjs.has(id)) {
|
1889
|
+
return;
|
1890
|
+
}
|
1891
|
+
|
1892
|
+
switch (type) {
|
1893
|
+
case 'Font':
|
1894
|
+
var params = _this14._params;
|
1895
|
+
|
1896
|
+
if ('error' in exportedData) {
|
1897
|
+
var exportedError = exportedData.error;
|
1898
|
+
(0, _util.warn)("Error during font loading: ".concat(exportedError));
|
1899
|
+
|
1900
|
+
_this14.commonObjs.resolve(id, exportedError);
|
1901
|
+
|
1902
|
+
break;
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
var fontRegistry = null;
|
1906
|
+
|
1907
|
+
if (params.pdfBug && _global_scope["default"].FontInspector && _global_scope["default"].FontInspector.enabled) {
|
1908
|
+
fontRegistry = {
|
1909
|
+
registerFont: function registerFont(font, url) {
|
1910
|
+
_global_scope["default"]['FontInspector'].fontAdded(font, url);
|
1911
|
+
}
|
1912
|
+
};
|
1913
|
+
}
|
1914
|
+
|
1915
|
+
var font = new _font_loader.FontFaceObject(exportedData, {
|
1916
|
+
isEvalSupported: params.isEvalSupported,
|
1917
|
+
disableFontFace: params.disableFontFace,
|
1918
|
+
ignoreErrors: params.ignoreErrors,
|
1919
|
+
onUnsupportedFeature: _this14._onUnsupportedFeature.bind(_this14),
|
1920
|
+
fontRegistry: fontRegistry
|
1921
|
+
});
|
1922
|
+
|
1923
|
+
_this14.fontLoader.bind(font).then(function () {
|
1924
|
+
_this14.commonObjs.resolve(id, font);
|
1925
|
+
}, function (reason) {
|
1926
|
+
messageHandler.sendWithPromise('FontFallback', {
|
1927
|
+
id: id
|
1928
|
+
})["finally"](function () {
|
1929
|
+
_this14.commonObjs.resolve(id, font);
|
1930
|
+
});
|
1931
|
+
});
|
1932
|
+
|
1933
|
+
break;
|
1934
|
+
|
1935
|
+
case 'FontPath':
|
1936
|
+
case 'FontType3Res':
|
1937
|
+
_this14.commonObjs.resolve(id, exportedData);
|
1938
|
+
|
1939
|
+
break;
|
1940
|
+
|
1941
|
+
default:
|
1942
|
+
throw new Error("Got unknown common object type ".concat(type));
|
1943
|
+
}
|
1944
|
+
});
|
1945
|
+
messageHandler.on('obj', function (data) {
|
1946
|
+
if (_this14.destroyed) {
|
1947
|
+
return undefined;
|
1948
|
+
}
|
1949
|
+
|
1950
|
+
var _data2 = _slicedToArray(data, 4),
|
1951
|
+
id = _data2[0],
|
1952
|
+
pageIndex = _data2[1],
|
1953
|
+
type = _data2[2],
|
1954
|
+
imageData = _data2[3];
|
1955
|
+
|
1956
|
+
var pageProxy = _this14.pageCache[pageIndex];
|
1957
|
+
|
1958
|
+
if (pageProxy.objs.has(id)) {
|
1959
|
+
return undefined;
|
1960
|
+
}
|
1961
|
+
|
1962
|
+
switch (type) {
|
1963
|
+
case 'JpegStream':
|
1964
|
+
return new Promise(function (resolve, reject) {
|
1965
|
+
var img = new Image();
|
1966
|
+
|
1967
|
+
img.onload = function () {
|
1968
|
+
resolve(img);
|
1969
|
+
};
|
1970
|
+
|
1971
|
+
img.onerror = function () {
|
1972
|
+
reject(new Error('Error during JPEG image loading'));
|
1973
|
+
(0, _display_utils.releaseImageResources)(img);
|
1974
|
+
};
|
1975
|
+
|
1976
|
+
img.src = imageData;
|
1977
|
+
}).then(function (img) {
|
1978
|
+
pageProxy.objs.resolve(id, img);
|
1979
|
+
});
|
1980
|
+
|
1981
|
+
case 'Image':
|
1982
|
+
pageProxy.objs.resolve(id, imageData);
|
1983
|
+
var MAX_IMAGE_SIZE_TO_STORE = 8000000;
|
1984
|
+
|
1985
|
+
if (imageData && 'data' in imageData && imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
|
1986
|
+
pageProxy.cleanupAfterRender = true;
|
1987
|
+
}
|
1988
|
+
|
1989
|
+
break;
|
1990
|
+
|
1991
|
+
default:
|
1992
|
+
throw new Error("Got unknown object type ".concat(type));
|
1993
|
+
}
|
1994
|
+
|
1995
|
+
return undefined;
|
1996
|
+
});
|
1997
|
+
messageHandler.on('DocProgress', function (data) {
|
1998
|
+
if (_this14.destroyed) {
|
1999
|
+
return;
|
2000
|
+
}
|
2001
|
+
|
2002
|
+
if (loadingTask.onProgress) {
|
2003
|
+
loadingTask.onProgress({
|
2004
|
+
loaded: data.loaded,
|
2005
|
+
total: data.total
|
2006
|
+
});
|
2007
|
+
}
|
2008
|
+
});
|
2009
|
+
messageHandler.on('UnsupportedFeature', this._onUnsupportedFeature.bind(this));
|
2010
|
+
messageHandler.on('JpegDecode', function (data) {
|
2011
|
+
if (_this14.destroyed) {
|
2012
|
+
return Promise.reject(new Error('Worker was destroyed'));
|
2013
|
+
}
|
2014
|
+
|
2015
|
+
if (typeof document === 'undefined') {
|
2016
|
+
return Promise.reject(new Error('"document" is not defined.'));
|
2017
|
+
}
|
2018
|
+
|
2019
|
+
var _data3 = _slicedToArray(data, 2),
|
2020
|
+
imageUrl = _data3[0],
|
2021
|
+
components = _data3[1];
|
2022
|
+
|
2023
|
+
if (components !== 3 && components !== 1) {
|
2024
|
+
return Promise.reject(new Error('Only 3 components or 1 component can be returned'));
|
2025
|
+
}
|
2026
|
+
|
2027
|
+
return new Promise(function (resolve, reject) {
|
2028
|
+
var img = new Image();
|
2029
|
+
|
2030
|
+
img.onload = function () {
|
2031
|
+
var width = img.width,
|
2032
|
+
height = img.height;
|
2033
|
+
var size = width * height;
|
2034
|
+
var rgbaLength = size * 4;
|
2035
|
+
var buf = new Uint8ClampedArray(size * components);
|
2036
|
+
var tmpCanvas = document.createElement('canvas');
|
2037
|
+
tmpCanvas.width = width;
|
2038
|
+
tmpCanvas.height = height;
|
2039
|
+
var tmpCtx = tmpCanvas.getContext('2d');
|
2040
|
+
tmpCtx.drawImage(img, 0, 0);
|
2041
|
+
var data = tmpCtx.getImageData(0, 0, width, height).data;
|
2042
|
+
|
2043
|
+
if (components === 3) {
|
2044
|
+
for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
|
2045
|
+
buf[j] = data[i];
|
2046
|
+
buf[j + 1] = data[i + 1];
|
2047
|
+
buf[j + 2] = data[i + 2];
|
2048
|
+
}
|
2049
|
+
} else if (components === 1) {
|
2050
|
+
for (var _i2 = 0, _j = 0; _i2 < rgbaLength; _i2 += 4, _j++) {
|
2051
|
+
buf[_j] = data[_i2];
|
2052
|
+
}
|
2053
|
+
}
|
2054
|
+
|
2055
|
+
resolve({
|
2056
|
+
data: buf,
|
2057
|
+
width: width,
|
2058
|
+
height: height
|
2059
|
+
});
|
2060
|
+
(0, _display_utils.releaseImageResources)(img);
|
2061
|
+
tmpCanvas.width = 0;
|
2062
|
+
tmpCanvas.height = 0;
|
2063
|
+
tmpCanvas = null;
|
2064
|
+
tmpCtx = null;
|
2065
|
+
};
|
2066
|
+
|
2067
|
+
img.onerror = function () {
|
2068
|
+
reject(new Error('JpegDecode failed to load image'));
|
2069
|
+
(0, _display_utils.releaseImageResources)(img);
|
2070
|
+
};
|
2071
|
+
|
2072
|
+
img.src = imageUrl;
|
2073
|
+
});
|
2074
|
+
});
|
2075
|
+
messageHandler.on('FetchBuiltInCMap', function (data, sink) {
|
2076
|
+
if (_this14.destroyed) {
|
2077
|
+
sink.error(new Error('Worker was destroyed'));
|
2078
|
+
return;
|
2079
|
+
}
|
2080
|
+
|
2081
|
+
var fetched = false;
|
2082
|
+
|
2083
|
+
sink.onPull = function () {
|
2084
|
+
if (fetched) {
|
2085
|
+
sink.close();
|
2086
|
+
return;
|
2087
|
+
}
|
2088
|
+
|
2089
|
+
fetched = true;
|
2090
|
+
|
2091
|
+
_this14.CMapReaderFactory.fetch(data).then(function (builtInCMap) {
|
2092
|
+
sink.enqueue(builtInCMap, 1, [builtInCMap.cMapData.buffer]);
|
2093
|
+
})["catch"](function (reason) {
|
2094
|
+
sink.error(reason);
|
2095
|
+
});
|
2096
|
+
};
|
2097
|
+
});
|
2098
|
+
}
|
2099
|
+
}, {
|
2100
|
+
key: "_onUnsupportedFeature",
|
2101
|
+
value: function _onUnsupportedFeature(_ref12) {
|
2102
|
+
var featureId = _ref12.featureId;
|
2103
|
+
|
2104
|
+
if (this.destroyed) {
|
2105
|
+
return;
|
2106
|
+
}
|
2107
|
+
|
2108
|
+
if (this.loadingTask.onUnsupportedFeature) {
|
2109
|
+
this.loadingTask.onUnsupportedFeature(featureId);
|
2110
|
+
}
|
2111
|
+
}
|
2112
|
+
}, {
|
2113
|
+
key: "getData",
|
2114
|
+
value: function getData() {
|
2115
|
+
return this.messageHandler.sendWithPromise('GetData', null);
|
2116
|
+
}
|
2117
|
+
}, {
|
2118
|
+
key: "getPage",
|
2119
|
+
value: function getPage(pageNumber) {
|
2120
|
+
var _this15 = this;
|
2121
|
+
|
2122
|
+
if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) {
|
2123
|
+
return Promise.reject(new Error('Invalid page request'));
|
2124
|
+
}
|
2125
|
+
|
2126
|
+
var pageIndex = pageNumber - 1;
|
2127
|
+
|
2128
|
+
if (pageIndex in this.pagePromises) {
|
2129
|
+
return this.pagePromises[pageIndex];
|
2130
|
+
}
|
2131
|
+
|
2132
|
+
var promise = this.messageHandler.sendWithPromise('GetPage', {
|
2133
|
+
pageIndex: pageIndex
|
2134
|
+
}).then(function (pageInfo) {
|
2135
|
+
if (_this15.destroyed) {
|
2136
|
+
throw new Error('Transport destroyed');
|
2137
|
+
}
|
2138
|
+
|
2139
|
+
var page = new PDFPageProxy(pageIndex, pageInfo, _this15, _this15._params.pdfBug);
|
2140
|
+
_this15.pageCache[pageIndex] = page;
|
2141
|
+
return page;
|
2142
|
+
});
|
2143
|
+
this.pagePromises[pageIndex] = promise;
|
2144
|
+
return promise;
|
2145
|
+
}
|
2146
|
+
}, {
|
2147
|
+
key: "getPageIndex",
|
2148
|
+
value: function getPageIndex(ref) {
|
2149
|
+
return this.messageHandler.sendWithPromise('GetPageIndex', {
|
2150
|
+
ref: ref
|
2151
|
+
})["catch"](function (reason) {
|
2152
|
+
return Promise.reject(new Error(reason));
|
2153
|
+
});
|
2154
|
+
}
|
2155
|
+
}, {
|
2156
|
+
key: "getAnnotations",
|
2157
|
+
value: function getAnnotations(pageIndex, intent) {
|
2158
|
+
return this.messageHandler.sendWithPromise('GetAnnotations', {
|
2159
|
+
pageIndex: pageIndex,
|
2160
|
+
intent: intent
|
2161
|
+
});
|
2162
|
+
}
|
2163
|
+
}, {
|
2164
|
+
key: "getDestinations",
|
2165
|
+
value: function getDestinations() {
|
2166
|
+
return this.messageHandler.sendWithPromise('GetDestinations', null);
|
2167
|
+
}
|
2168
|
+
}, {
|
2169
|
+
key: "getDestination",
|
2170
|
+
value: function getDestination(id) {
|
2171
|
+
if (typeof id !== 'string') {
|
2172
|
+
return Promise.reject(new Error('Invalid destination request.'));
|
2173
|
+
}
|
2174
|
+
|
2175
|
+
return this.messageHandler.sendWithPromise('GetDestination', {
|
2176
|
+
id: id
|
2177
|
+
});
|
2178
|
+
}
|
2179
|
+
}, {
|
2180
|
+
key: "getPageLabels",
|
2181
|
+
value: function getPageLabels() {
|
2182
|
+
return this.messageHandler.sendWithPromise('GetPageLabels', null);
|
2183
|
+
}
|
2184
|
+
}, {
|
2185
|
+
key: "getPageLayout",
|
2186
|
+
value: function getPageLayout() {
|
2187
|
+
return this.messageHandler.sendWithPromise('GetPageLayout', null);
|
2188
|
+
}
|
2189
|
+
}, {
|
2190
|
+
key: "getPageMode",
|
2191
|
+
value: function getPageMode() {
|
2192
|
+
return this.messageHandler.sendWithPromise('GetPageMode', null);
|
2193
|
+
}
|
2194
|
+
}, {
|
2195
|
+
key: "getViewerPreferences",
|
2196
|
+
value: function getViewerPreferences() {
|
2197
|
+
return this.messageHandler.sendWithPromise('GetViewerPreferences', null);
|
2198
|
+
}
|
2199
|
+
}, {
|
2200
|
+
key: "getOpenActionDestination",
|
2201
|
+
value: function getOpenActionDestination() {
|
2202
|
+
return this.messageHandler.sendWithPromise('GetOpenActionDestination', null);
|
2203
|
+
}
|
2204
|
+
}, {
|
2205
|
+
key: "getAttachments",
|
2206
|
+
value: function getAttachments() {
|
2207
|
+
return this.messageHandler.sendWithPromise('GetAttachments', null);
|
2208
|
+
}
|
2209
|
+
}, {
|
2210
|
+
key: "getJavaScript",
|
2211
|
+
value: function getJavaScript() {
|
2212
|
+
return this.messageHandler.sendWithPromise('GetJavaScript', null);
|
2213
|
+
}
|
2214
|
+
}, {
|
2215
|
+
key: "getOutline",
|
2216
|
+
value: function getOutline() {
|
2217
|
+
return this.messageHandler.sendWithPromise('GetOutline', null);
|
2218
|
+
}
|
2219
|
+
}, {
|
2220
|
+
key: "getPermissions",
|
2221
|
+
value: function getPermissions() {
|
2222
|
+
return this.messageHandler.sendWithPromise('GetPermissions', null);
|
2223
|
+
}
|
2224
|
+
}, {
|
2225
|
+
key: "getMetadata",
|
2226
|
+
value: function getMetadata() {
|
2227
|
+
var _this16 = this;
|
2228
|
+
|
2229
|
+
return this.messageHandler.sendWithPromise('GetMetadata', null).then(function (results) {
|
2230
|
+
return {
|
2231
|
+
info: results[0],
|
2232
|
+
metadata: results[1] ? new _metadata.Metadata(results[1]) : null,
|
2233
|
+
contentDispositionFilename: _this16._fullReader ? _this16._fullReader.filename : null
|
2234
|
+
};
|
2235
|
+
});
|
2236
|
+
}
|
2237
|
+
}, {
|
2238
|
+
key: "getStats",
|
2239
|
+
value: function getStats() {
|
2240
|
+
return this.messageHandler.sendWithPromise('GetStats', null);
|
2241
|
+
}
|
2242
|
+
}, {
|
2243
|
+
key: "startCleanup",
|
2244
|
+
value: function startCleanup() {
|
2245
|
+
var _this17 = this;
|
2246
|
+
|
2247
|
+
this.messageHandler.sendWithPromise('Cleanup', null).then(function () {
|
2248
|
+
for (var i = 0, ii = _this17.pageCache.length; i < ii; i++) {
|
2249
|
+
var page = _this17.pageCache[i];
|
2250
|
+
|
2251
|
+
if (page) {
|
2252
|
+
page.cleanup();
|
2253
|
+
}
|
2254
|
+
}
|
2255
|
+
|
2256
|
+
_this17.commonObjs.clear();
|
2257
|
+
|
2258
|
+
_this17.fontLoader.clear();
|
2259
|
+
});
|
2260
|
+
}
|
2261
|
+
}, {
|
2262
|
+
key: "loadingParams",
|
2263
|
+
get: function get() {
|
2264
|
+
var params = this._params;
|
2265
|
+
return (0, _util.shadow)(this, 'loadingParams', {
|
2266
|
+
disableAutoFetch: params.disableAutoFetch,
|
2267
|
+
disableCreateObjectURL: params.disableCreateObjectURL,
|
2268
|
+
disableFontFace: params.disableFontFace,
|
2269
|
+
nativeImageDecoderSupport: params.nativeImageDecoderSupport
|
2270
|
+
});
|
2271
|
+
}
|
2272
|
+
}]);
|
2273
|
+
|
2274
|
+
return WorkerTransport;
|
2275
|
+
}();
|
2276
|
+
|
2277
|
+
var PDFObjects =
|
2278
|
+
/*#__PURE__*/
|
2279
|
+
function () {
|
2280
|
+
function PDFObjects() {
|
2281
|
+
_classCallCheck(this, PDFObjects);
|
2282
|
+
|
2283
|
+
this._objs = Object.create(null);
|
2284
|
+
}
|
2285
|
+
|
2286
|
+
_createClass(PDFObjects, [{
|
2287
|
+
key: "_ensureObj",
|
2288
|
+
value: function _ensureObj(objId) {
|
2289
|
+
if (this._objs[objId]) {
|
2290
|
+
return this._objs[objId];
|
2291
|
+
}
|
2292
|
+
|
2293
|
+
return this._objs[objId] = {
|
2294
|
+
capability: (0, _util.createPromiseCapability)(),
|
2295
|
+
data: null,
|
2296
|
+
resolved: false
|
2297
|
+
};
|
2298
|
+
}
|
2299
|
+
}, {
|
2300
|
+
key: "get",
|
2301
|
+
value: function get(objId) {
|
2302
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
2303
|
+
|
2304
|
+
if (callback) {
|
2305
|
+
this._ensureObj(objId).capability.promise.then(callback);
|
2306
|
+
|
2307
|
+
return null;
|
2308
|
+
}
|
2309
|
+
|
2310
|
+
var obj = this._objs[objId];
|
2311
|
+
|
2312
|
+
if (!obj || !obj.resolved) {
|
2313
|
+
throw new Error("Requesting object that isn't resolved yet ".concat(objId, "."));
|
2314
|
+
}
|
2315
|
+
|
2316
|
+
return obj.data;
|
2317
|
+
}
|
2318
|
+
}, {
|
2319
|
+
key: "has",
|
2320
|
+
value: function has(objId) {
|
2321
|
+
var obj = this._objs[objId];
|
2322
|
+
return obj ? obj.resolved : false;
|
2323
|
+
}
|
2324
|
+
}, {
|
2325
|
+
key: "resolve",
|
2326
|
+
value: function resolve(objId, data) {
|
2327
|
+
var obj = this._ensureObj(objId);
|
2328
|
+
|
2329
|
+
obj.resolved = true;
|
2330
|
+
obj.data = data;
|
2331
|
+
obj.capability.resolve(data);
|
2332
|
+
}
|
2333
|
+
}, {
|
2334
|
+
key: "clear",
|
2335
|
+
value: function clear() {
|
2336
|
+
for (var objId in this._objs) {
|
2337
|
+
var data = this._objs[objId].data;
|
2338
|
+
|
2339
|
+
if (typeof Image !== 'undefined' && data instanceof Image) {
|
2340
|
+
(0, _display_utils.releaseImageResources)(data);
|
2341
|
+
}
|
2342
|
+
}
|
2343
|
+
|
2344
|
+
this._objs = Object.create(null);
|
2345
|
+
}
|
2346
|
+
}]);
|
2347
|
+
|
2348
|
+
return PDFObjects;
|
2349
|
+
}();
|
2350
|
+
|
2351
|
+
var RenderTask =
|
2352
|
+
/*#__PURE__*/
|
2353
|
+
function () {
|
2354
|
+
function RenderTask(internalRenderTask) {
|
2355
|
+
_classCallCheck(this, RenderTask);
|
2356
|
+
|
2357
|
+
this._internalRenderTask = internalRenderTask;
|
2358
|
+
this.onContinue = null;
|
2359
|
+
}
|
2360
|
+
|
2361
|
+
_createClass(RenderTask, [{
|
2362
|
+
key: "cancel",
|
2363
|
+
value: function cancel() {
|
2364
|
+
this._internalRenderTask.cancel();
|
2365
|
+
}
|
2366
|
+
}, {
|
2367
|
+
key: "then",
|
2368
|
+
value: function then(onFulfilled, onRejected) {
|
2369
|
+
(0, _display_utils.deprecated)('RenderTask.then method, use the `promise` getter instead.');
|
2370
|
+
return this.promise.then.apply(this.promise, arguments);
|
2371
|
+
}
|
2372
|
+
}, {
|
2373
|
+
key: "promise",
|
2374
|
+
get: function get() {
|
2375
|
+
return this._internalRenderTask.capability.promise;
|
2376
|
+
}
|
2377
|
+
}]);
|
2378
|
+
|
2379
|
+
return RenderTask;
|
2380
|
+
}();
|
2381
|
+
|
2382
|
+
var InternalRenderTask = function InternalRenderTaskClosure() {
|
2383
|
+
var canvasInRendering = new WeakSet();
|
2384
|
+
|
2385
|
+
var InternalRenderTask =
|
2386
|
+
/*#__PURE__*/
|
2387
|
+
function () {
|
2388
|
+
function InternalRenderTask(_ref13) {
|
2389
|
+
var callback = _ref13.callback,
|
2390
|
+
params = _ref13.params,
|
2391
|
+
objs = _ref13.objs,
|
2392
|
+
commonObjs = _ref13.commonObjs,
|
2393
|
+
operatorList = _ref13.operatorList,
|
2394
|
+
pageNumber = _ref13.pageNumber,
|
2395
|
+
canvasFactory = _ref13.canvasFactory,
|
2396
|
+
webGLContext = _ref13.webGLContext,
|
2397
|
+
_ref13$useRequestAnim = _ref13.useRequestAnimationFrame,
|
2398
|
+
useRequestAnimationFrame = _ref13$useRequestAnim === void 0 ? false : _ref13$useRequestAnim,
|
2399
|
+
_ref13$pdfBug = _ref13.pdfBug,
|
2400
|
+
pdfBug = _ref13$pdfBug === void 0 ? false : _ref13$pdfBug;
|
2401
|
+
|
2402
|
+
_classCallCheck(this, InternalRenderTask);
|
2403
|
+
|
2404
|
+
this.callback = callback;
|
2405
|
+
this.params = params;
|
2406
|
+
this.objs = objs;
|
2407
|
+
this.commonObjs = commonObjs;
|
2408
|
+
this.operatorListIdx = null;
|
2409
|
+
this.operatorList = operatorList;
|
2410
|
+
this.pageNumber = pageNumber;
|
2411
|
+
this.canvasFactory = canvasFactory;
|
2412
|
+
this.webGLContext = webGLContext;
|
2413
|
+
this._pdfBug = pdfBug;
|
2414
|
+
this.running = false;
|
2415
|
+
this.graphicsReadyCallback = null;
|
2416
|
+
this.graphicsReady = false;
|
2417
|
+
this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== 'undefined';
|
2418
|
+
this.cancelled = false;
|
2419
|
+
this.capability = (0, _util.createPromiseCapability)();
|
2420
|
+
this.task = new RenderTask(this);
|
2421
|
+
this._continueBound = this._continue.bind(this);
|
2422
|
+
this._scheduleNextBound = this._scheduleNext.bind(this);
|
2423
|
+
this._nextBound = this._next.bind(this);
|
2424
|
+
this._canvas = params.canvasContext.canvas;
|
2425
|
+
}
|
2426
|
+
|
2427
|
+
_createClass(InternalRenderTask, [{
|
2428
|
+
key: "initializeGraphics",
|
2429
|
+
value: function initializeGraphics() {
|
2430
|
+
var transparency = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
2431
|
+
|
2432
|
+
if (this.cancelled) {
|
2433
|
+
return;
|
2434
|
+
}
|
2435
|
+
|
2436
|
+
if (this._canvas) {
|
2437
|
+
if (canvasInRendering.has(this._canvas)) {
|
2438
|
+
throw new Error('Cannot use the same canvas during multiple render() operations. ' + 'Use different canvas or ensure previous operations were ' + 'cancelled or completed.');
|
2439
|
+
}
|
2440
|
+
|
2441
|
+
canvasInRendering.add(this._canvas);
|
2442
|
+
}
|
2443
|
+
|
2444
|
+
if (this._pdfBug && _global_scope["default"].StepperManager && _global_scope["default"].StepperManager.enabled) {
|
2445
|
+
this.stepper = _global_scope["default"].StepperManager.create(this.pageNumber - 1);
|
2446
|
+
this.stepper.init(this.operatorList);
|
2447
|
+
this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();
|
2448
|
+
}
|
2449
|
+
|
2450
|
+
var _this$params = this.params,
|
2451
|
+
canvasContext = _this$params.canvasContext,
|
2452
|
+
viewport = _this$params.viewport,
|
2453
|
+
transform = _this$params.transform,
|
2454
|
+
imageLayer = _this$params.imageLayer,
|
2455
|
+
background = _this$params.background;
|
2456
|
+
this.gfx = new _canvas.CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.webGLContext, imageLayer);
|
2457
|
+
this.gfx.beginDrawing({
|
2458
|
+
transform: transform,
|
2459
|
+
viewport: viewport,
|
2460
|
+
transparency: transparency,
|
2461
|
+
background: background
|
2462
|
+
});
|
2463
|
+
this.operatorListIdx = 0;
|
2464
|
+
this.graphicsReady = true;
|
2465
|
+
|
2466
|
+
if (this.graphicsReadyCallback) {
|
2467
|
+
this.graphicsReadyCallback();
|
2468
|
+
}
|
2469
|
+
}
|
2470
|
+
}, {
|
2471
|
+
key: "cancel",
|
2472
|
+
value: function cancel() {
|
2473
|
+
var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
2474
|
+
this.running = false;
|
2475
|
+
this.cancelled = true;
|
2476
|
+
|
2477
|
+
if (this.gfx) {
|
2478
|
+
this.gfx.endDrawing();
|
2479
|
+
}
|
2480
|
+
|
2481
|
+
if (this._canvas) {
|
2482
|
+
canvasInRendering["delete"](this._canvas);
|
2483
|
+
}
|
2484
|
+
|
2485
|
+
this.callback(error || new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this.pageNumber), 'canvas'));
|
2486
|
+
}
|
2487
|
+
}, {
|
2488
|
+
key: "operatorListChanged",
|
2489
|
+
value: function operatorListChanged() {
|
2490
|
+
if (!this.graphicsReady) {
|
2491
|
+
if (!this.graphicsReadyCallback) {
|
2492
|
+
this.graphicsReadyCallback = this._continueBound;
|
2493
|
+
}
|
2494
|
+
|
2495
|
+
return;
|
2496
|
+
}
|
2497
|
+
|
2498
|
+
if (this.stepper) {
|
2499
|
+
this.stepper.updateOperatorList(this.operatorList);
|
2500
|
+
}
|
2501
|
+
|
2502
|
+
if (this.running) {
|
2503
|
+
return;
|
2504
|
+
}
|
2505
|
+
|
2506
|
+
this._continue();
|
2507
|
+
}
|
2508
|
+
}, {
|
2509
|
+
key: "_continue",
|
2510
|
+
value: function _continue() {
|
2511
|
+
this.running = true;
|
2512
|
+
|
2513
|
+
if (this.cancelled) {
|
2514
|
+
return;
|
2515
|
+
}
|
2516
|
+
|
2517
|
+
if (this.task.onContinue) {
|
2518
|
+
this.task.onContinue(this._scheduleNextBound);
|
2519
|
+
} else {
|
2520
|
+
this._scheduleNext();
|
2521
|
+
}
|
2522
|
+
}
|
2523
|
+
}, {
|
2524
|
+
key: "_scheduleNext",
|
2525
|
+
value: function _scheduleNext() {
|
2526
|
+
var _this18 = this;
|
2527
|
+
|
2528
|
+
if (this._useRequestAnimationFrame) {
|
2529
|
+
window.requestAnimationFrame(function () {
|
2530
|
+
_this18._nextBound()["catch"](_this18.cancel.bind(_this18));
|
2531
|
+
});
|
2532
|
+
} else {
|
2533
|
+
Promise.resolve().then(this._nextBound)["catch"](this.cancel.bind(this));
|
2534
|
+
}
|
2535
|
+
}
|
2536
|
+
}, {
|
2537
|
+
key: "_next",
|
2538
|
+
value: function () {
|
2539
|
+
var _next2 = _asyncToGenerator(
|
2540
|
+
/*#__PURE__*/
|
2541
|
+
_regenerator["default"].mark(function _callee() {
|
2542
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
2543
|
+
while (1) {
|
2544
|
+
switch (_context.prev = _context.next) {
|
2545
|
+
case 0:
|
2546
|
+
if (!this.cancelled) {
|
2547
|
+
_context.next = 2;
|
2548
|
+
break;
|
2549
|
+
}
|
2550
|
+
|
2551
|
+
return _context.abrupt("return");
|
2552
|
+
|
2553
|
+
case 2:
|
2554
|
+
this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper);
|
2555
|
+
|
2556
|
+
if (this.operatorListIdx === this.operatorList.argsArray.length) {
|
2557
|
+
this.running = false;
|
2558
|
+
|
2559
|
+
if (this.operatorList.lastChunk) {
|
2560
|
+
this.gfx.endDrawing();
|
2561
|
+
|
2562
|
+
if (this._canvas) {
|
2563
|
+
canvasInRendering["delete"](this._canvas);
|
2564
|
+
}
|
2565
|
+
|
2566
|
+
this.callback();
|
2567
|
+
}
|
2568
|
+
}
|
2569
|
+
|
2570
|
+
case 4:
|
2571
|
+
case "end":
|
2572
|
+
return _context.stop();
|
2573
|
+
}
|
2574
|
+
}
|
2575
|
+
}, _callee, this);
|
2576
|
+
}));
|
2577
|
+
|
2578
|
+
function _next() {
|
2579
|
+
return _next2.apply(this, arguments);
|
2580
|
+
}
|
2581
|
+
|
2582
|
+
return _next;
|
2583
|
+
}()
|
2584
|
+
}]);
|
2585
|
+
|
2586
|
+
return InternalRenderTask;
|
2587
|
+
}();
|
2588
|
+
|
2589
|
+
return InternalRenderTask;
|
2590
|
+
}();
|
2591
|
+
|
2592
|
+
var version = '2.3.200';
|
2593
|
+
exports.version = version;
|
2594
|
+
var build = '4ae3f9fc';
|
2595
|
+
exports.build = build;
|