@nutrient-sdk/viewer 1.7.0-nightly.20250814 → 1.7.0-nightly.20250815
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/dist/nutrient-viewer-lib/{chunk-848-cc4a647be0ed0eaf.js → chunk-848-57acad99d71653f0.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-core-worker-e365b5cccda747e3.js → chunk-core-worker-673763437d3b8d99.js} +2 -2
- package/dist/nutrient-viewer-lib/{chunk-gdpicture-01923e038047034c.js → chunk-gdpicture-5569d6fbf37498d1.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-gdpicture-worker-9653865068b01ba5.js → chunk-gdpicture-worker-aff6ab85cd8b01fc.js} +2 -2
- package/dist/nutrient-viewer-lib/{chunk-lazy-sha-358e68b534e25a2b.js → chunk-lazy-sha-6c97e85e401a7356.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-ar-11069c474f3794bb.js → chunk-locale-ar-4e9fce28007bce6c.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-cs-975a662e9462805b.js → chunk-locale-cs-59e559db3a2174ae.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-cy-462acd7c17ec76b9.js → chunk-locale-cy-02e53061d0413e7e.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-da-3f75a922030f8628.js → chunk-locale-da-a5949dea45cc5903.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-de-2e82bfe4be06752d.js → chunk-locale-de-4e7f7bbabc2fa3c8.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-el-d587cf8d63a7a960.js → chunk-locale-el-4438c6a6b99d1344.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-en-GB-f1f60486be826fb2.js → chunk-locale-en-GB-fbfcb986a1353ee1.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-es-4a4d810a28ef3dcb.js → chunk-locale-es-ec407b8eb5b8423b.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-fi-fc9030586ca92b9e.js → chunk-locale-fi-54b0a465e9fd427a.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-fr-eb86e5fe391a4f4b.js → chunk-locale-fr-245ab1227fd12712.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-fr-CA-c301d67fa4469cfe.js → chunk-locale-fr-CA-8a7df8cdaa934a33.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-he-f6d3995f6ff06318.js → chunk-locale-he-a768cca6dcce743d.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-hr-a9d0da38140970e1.js → chunk-locale-hr-05f276e11091a641.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-id-be19579296595bb3.js → chunk-locale-id-5d1ff0a6887d33cc.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-it-eeb69c2b975b0bf1.js → chunk-locale-it-a89d95aa4a2a3ba9.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-ja-ae0210c7276d9674.js → chunk-locale-ja-56c17b6d6f8ddf00.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-ko-08202a57934f8493.js → chunk-locale-ko-769f0991fddbafbc.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-ms-c97c706b916c448e.js → chunk-locale-ms-55af5592a1c8669c.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-nb-NO-a2618d5fb8504e49.js → chunk-locale-nb-NO-8200921e9112819a.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-nl-abb313acdc2f487b.js → chunk-locale-nl-1f17c9618d2521a7.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-pl-4602b0aed039d3d2.js → chunk-locale-pl-73a92cf91ac69982.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-pt-536395aec01d8031.js → chunk-locale-pt-0ede4a822eba7ea1.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-pt-PT-007666ad0f78c0c6.js → chunk-locale-pt-PT-f7067f9c2303bda4.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-ru-18b3b82cd29f54cc.js → chunk-locale-ru-e643b0ce53dbacd1.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-sk-77f7bbdfd9086cbf.js → chunk-locale-sk-e598da8496af435c.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-sl-a13ad37c36505720.js → chunk-locale-sl-6fa89f23aababb48.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-sv-ab4aca0f20800ba5.js → chunk-locale-sv-f0bda4de3474c37c.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-th-37c1c4887eb67570.js → chunk-locale-th-d456f500ac0048b6.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-tr-8f1b3a2395eaa814.js → chunk-locale-tr-8d853ee90d22cba3.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-uk-c452674da8a2d0a9.js → chunk-locale-uk-71bc08c63790e152.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-zh-Hans-41671a7810c54305.js → chunk-locale-zh-Hans-7b0d009755c53081.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-locale-zh-Hant-f2a05dbbd5cda4fe.js → chunk-locale-zh-Hant-b74a665d2ed09074.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-server-df044f2d35596a96.js → chunk-server-a9c4e873b2f9cf19.js} +2 -2
- package/dist/nutrient-viewer-lib/{chunk-server-instant-717e9675ffc932e0.js → chunk-server-instant-9b01f043716395a6.js} +1 -1
- package/dist/nutrient-viewer-lib/{chunk-server-rest-2bcf43fdf762a30c.js → chunk-server-rest-affd1c8d84913bee.js} +1 -1
- package/dist/nutrient-viewer-lib/chunk-standalone-a711acc5e069d220.js +13 -0
- package/dist/nutrient-viewer-lib/{chunk-standalone-server-9338897a020e7652.js → chunk-standalone-server-875e70a448761cde.js} +1 -1
- package/dist/nutrient-viewer-lib/core-worker.js +2 -2
- package/dist/nutrient-viewer-lib/dark-402cc98d3d69bff8.css +1 -1
- package/dist/nutrient-viewer-lib/gdpicture-worker.js +1 -1
- package/dist/nutrient-viewer-lib/{nutrient-viewer-1.7.0-b9bbb6c.css → nutrient-viewer-1.7.0-58d65d8.css} +1 -1
- package/dist/nutrient-viewer-lib/nutrient-viewer-9a1f471b19899a71.wasm.js +1 -1
- package/dist/nutrient-viewer-lib/{nutrient-viewer-3eede0664e6767de.wasm → nutrient-viewer-a4193ee3cec77ae8.wasm} +0 -0
- package/dist/nutrient-viewer.js +2 -2
- package/package.json +1 -1
- package/dist/nutrient-viewer-lib/chunk-standalone-cd66a3b071fdf7bd.js +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutrient-sdk/viewer",
|
|
3
|
-
"version": "1.7.0-nightly.
|
|
3
|
+
"version": "1.7.0-nightly.20250815",
|
|
4
4
|
"description": "View and annotate PDF files in your web app. Full support for mobile and desktop. Runs in the browser using WASM.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pdf",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Nutrient Web SDK 1.7.0-b9bbb6c (https://www.nutrient.io/sdk/web)
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
|
|
5
|
-
*
|
|
6
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
7
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
8
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
9
|
-
* This notice may not be removed from this file.
|
|
10
|
-
*
|
|
11
|
-
* PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
|
|
12
|
-
*/
|
|
13
|
-
"use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[362],{63993:(e,t,s)=>{s.r(t),s.d(t,{corePool:()=>l.mG,customFontsPromiseRef:()=>_,default:()=>b,loadModule:()=>D,normalizeCoreOptions:()=>l.DO,validateStandaloneConfiguration:()=>l.mn});var n=s(49568),a=s(85409),i=s(55994),o=s(41204),r=s(85410),l=s(20873),u=s(37506),c=s(85553),d=s(89055),m=s(68322),h=s(23227),f=s(84318),p=s(33075);async function y(e,t){const s=await fetch(e,{credentials:"same-origin"}).finally((()=>{t?.()})),n=await s.arrayBuffer();return{isFullyAvailable:!0,fullDocument:n,contentType:s.headers?.get("Content-Type")||(0,p.oj)(n)}}async function g(e,t,s,n){if(e instanceof ArrayBuffer)return{isFullyAvailable:!0,fullDocument:e,contentType:(0,p.oj)(e)};(0,a.V1)("string"==typeof e,"Document is not a string");let o=!1;const{linearizedDocument:r,serverSupportsRangeRequests:l}=await(async()=>{if(s&&function(e){if(e.startsWith("/"))return!0;try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}}(e)){const s=await t.openLinearizedDocument(i.EA);return(0,a.V1)(s,"Linearized document is not available"),{linearizedDocument:s,serverSupportsRangeRequests:await s.initialize(e)}}return{linearizedDocument:null,serverSupportsRangeRequests:!1}})();try{if(!l)return o=!0,y(e,n);(0,a.V1)(r,"Linearized document is not available"),r.startDownload();if(!await r.waitUntilIsLinearizedIsKnown())return r.destroy(),o=!0,y(e,n);n?.();const t=await r.waitUntilDocumentInfoAvailable();return t?(n?.(),{isFullyAvailable:!1,documentResponse:t,contentType:"application/pdf"}):(r.destroy(),o=!0,y(e,n))}catch(t){if(r?.destroy(),o)throw t;return y(e,n)}}let w;class b extends l.Ay{constructor(e){const t=e.baseUrl||(0,r.$_)(window.document),s=e.baseCoreUrl||t,n=e.baseProcessorEngineUrl||t,i={...e,baseUrl:t,baseCoreUrl:s,baseProcessorEngineUrl:n};if("string"!=typeof i.baseUrl)throw new a.uE("`baseUrl` is mandatory and must be a valid URL, e.g. `https://example.com/`");if("string"!=typeof i.document&&!(i.document instanceof ArrayBuffer))throw new a.uE("document must be either an URL to a supported document type (PDF and images), e.g. `https://example.com/document.pdf`, or an `ArrayBuffer`");if(w&&w!==i.licenseKey)throw new a.uE("Trying to re-use instance with a different licenseKey.\nUnfortunately we only allow one licenseKey per instance.\nPlease contact support for further assistance.");if("string"==typeof i.licenseKey&&i.licenseKey.startsWith("TRIAL-"))throw new a.uE("You're using the npm key instead of the license key. This key is used to download the Nutrient Web SDK package via the node package manager.\n\nLeave out the license key to activate as a trial.");super(i),this.destroyed=!1,this.activeConfiguration=e}async load(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=.2;e.progressCallback&&e.progressCallback("loading",t),this._isPDFJavaScriptEnabled=e.isPDFJavaScriptEnabled,"string"==typeof this._state.document&&(0,p.XC)(this._state.baseUrl,this._state.document,this._state.productId);const s=await D(this.client,this._state).finally((()=>{t+=.3,e.progressCallback&&e.progressCallback("loading",t)})),i=g(this._state.document,this.corePDFDocument,this._state.allowLinearizedLoading,(()=>{t+=.3,e.progressCallback&&e.progressCallback("loading",t)}));(0,a.V1)(s);const{features:r,signatureFeatureAvailability:l,capabilities:u}=s;if(this._state.productId===m.v.SharePoint&&"string"==typeof this._state.document&&Array.isArray(s.afu)){const e=new URL(this._state.document,this._state.baseUrl);if(!s.afu.some((t=>e.hostname.match(t))))throw new a.uE(`The document origin ${e.hostname} is not authorized.`)}const f=l===c.g.ELECTRONIC_SIGNATURES&&(0,d.UX)(r)&&this._state.forceLegacySignaturesFeature?c.g.LEGACY_SIGNATURES:l;this._state=this._state.set("features",(0,n.B8)(r)).set("signatureFeatureAvailability",f),w=this._state.licenseKey;const y=await i;let b=null;if(y.isFullyAvailable){let t=y.fullDocument.slice(0),s=null;if((0,p.C5)(y.contentType))try{this.destroyed?(t=null,b=await new Promise((()=>{}))):(b=await this.client.openDocument(y.fullDocument,{password:e.password,initialPageIndex:"number"==typeof e.initialPageIndex?e.initialPageIndex:0,formsConfiguration:this._formsConfiguration}),t=null)}catch(e){"INVALID_PASSWORD"===e.message&&this._state.document instanceof ArrayBuffer&&(this._state=this._state.set("document",e.callArgs[0])),"IMAGE_DOCUMENTS_NOT_LICENSED"===e.message&&(e.message="The image documents feature is not enabled for your license key. Please contact support or sales to purchase the UI module for your product."),s=e}else u.includes("GdPictureWASM")||(s=new a.uE("File not in PDF format or corrupted."));if(u.includes("GdPictureWASM")&&(s instanceof a.uE&&s.message.includes("File not in PDF format or corrupted.")||!(0,p.C5)(y.contentType))){(0,a.V1)(t);let n,i=(0,h.jU)();try{i||(i=(0,h.NY)({baseUrl:this._state.baseProcessorEngineUrl,mainThreadOrigin:this._state.appName||(0,o.D5)()||window.location.origin,licenseKey:this._state.licenseKey||void 0,customFonts:this._state.customFonts||void 0,dynamicFonts:this._state.dynamicFonts||void 0,fontSubstitutions:this._state.fontSubstitutions,processorEngine:this._state.processorEngine}),(0,h.Pm)(i)),n=await i,(0,a.V1)(n);const s=await n.toPdf(t,null,e.officeConversionSettings);b=await this.client.openDocument(s,{password:e.password,initialPageIndex:"number"==typeof e.initialPageIndex?e.initialPageIndex:0,formsConfiguration:this._formsConfiguration})}catch(e){throw"INVALID_PASSWORD"===e.message&&this._state.document instanceof ArrayBuffer&&(this._state=this._state.set("document",s.callArgs[0])),"IMAGE_DOCUMENTS_NOT_LICENSED"===e.message&&(e.message="The image documents feature is not enabled for your license key. Please contact support or sales to purchase the UI module for your product."),e}finally{t=null,n?.destroy(),(0,h.Pm)(null)}}else if(s)throw s;(0,a.V1)(b),await this.afterDocumentLoaded(b)}else b=y.documentResponse;return this._state=this._state.set("documentResponse",b),{features:this._state.features,signatureFeatureAvailability:this._state.signatureFeatureAvailability,hasPassword:!!e.password,password:e.password,allowedTileScales:"all",evaluation:s.evaluation,linearizedLoading:!y.isFullyAvailable,documentResponse:b}}destroy(){this.destroyed=!0,super.destroy()}getCustomFontsPromise(){return _}async afterDocumentLoaded(e){if(this._isPDFJavaScriptEnabled&&(this._initialChanges=await this.client.enablePDFJavaScriptSupport()),this._XFDF&&await this.client.importXFDF(this._XFDF.source,this._XFDF.keepCurrentAnnotations,this._XFDF.ignorePageRotation,this._XFDF.richTextEnabled),this._instantJSON&&this._instantJSON.pdfId&&e.ID.permanent){const t=this._instantJSON.pdfId,s=e.ID;if(t.permanent!==s.permanent)throw new a.uE("Could not instantiate from Instant JSON: Permanent PDF ID mismatch.\nPlease use the same PDF document that was used to create this Instant JSON.\nFor more information, please visit: https://www.nutrient.io/guides/web/importing-exporting/instant-json/");if(t.changing!==s.changing)throw new a.uE("Could not instantiate from Instant JSON: Changing PDF ID mismatch.\nPlease use the same revision of this PDF document that was used to create this Instant JSON.\nFor more information, please visit: https://www.nutrient.io/guides/web/importing-exporting/instant-json/")}if(this._trustedCAsCallback)try{const e=await this._trustedCAsCallback();if(!Array.isArray(e))throw new a.uE("Certificates response must be an array");if(e.some((e=>!(e instanceof ArrayBuffer)&&"string"!=typeof e)))throw new a.uE("All certificates must be passed as ArrayBuffer (DER) or string (PEM)");await this.client.loadCertificates(e.map(u.PI))}catch(e){throw new a.uE(`Could not retrieve certificates for digital signatures validation: ${e.message}.`)}}async waitUntilFullyLoaded(e){return this.corePDFDocument.linearizedDocument.waitUntilDownloaded().then((async()=>{await this.corePDFDocument.normallyOpenLinearizedDocument(this,{password:e,initialPageIndex:0,formsConfiguration:this._formsConfiguration}),await this.afterDocumentLoaded(this._state.documentResponse)}))}async getDocumentBytes(){if(this._state.document instanceof ArrayBuffer)return this._state.document;if("string"==typeof this._state.document){const e=await fetch(this._state.document);if(!e.ok)throw new a.uE(`Failed to fetch document: ${e.statusText}`);return e.arrayBuffer()}throw new a.uE("Document bytes are not available")}}const _={current:void 0};async function D(e,t){_.current=_.current||(t.customFonts?(0,f.eY)(t.customFonts):void 0);const s=(0,r.f)(t.appName);return e.loadNativeModule(t.baseCoreUrl,{mainThreadOrigin:s,disableWebAssemblyStreaming:t.disableWebAssemblyStreaming,enableAutomaticLinkExtraction:t.enableAutomaticLinkExtraction,overrideMemoryLimit:t.overrideMemoryLimit,workerSpawnerFn:()=>(0,i.pj)(t.inlineWorkers)}).then((async()=>e.load(t.baseCoreUrl,t.licenseKey,{mainThreadOrigin:s,..._.current?{customFonts:await _.current}:null,dynamicFonts:t.dynamicFonts,productId:t.productId,featureFlags:(()=>{const e=[];return t.enableCoreUnifiedComments&&e.push("UnifiedComments"),t.enableCorePreservePDFAccessibility&&e.push("PreservePDFAccessibility"),e.length>0?e:void 0})()})))}}}]);
|