Creates a new NutrientViewer instance.
Returns a Promise resolving to a new NutrientViewer.Instance, or rejecting with a NutrientViewer.Error.
It requires a configuration object. When the configuration is invalid, the promise will be rejected with a NutrientViewer.Error.
Load Nutrient Web SDK Server
NutrientViewer.load({ authPayload: { jwt: "xxx.xxx.xxx" }, container: ".foo", documentId: "85203", instant: true,}).then((instance) => { console.log("Successfully mounted NutrientViewer", instance);}).catch((error) => { console.error(error.message);}) Copy
NutrientViewer.load({ authPayload: { jwt: "xxx.xxx.xxx" }, container: ".foo", documentId: "85203", instant: true,}).then((instance) => { console.log("Successfully mounted NutrientViewer", instance);}).catch((error) => { console.error(error.message);})
Load Nutrient Web SDK Standalone
NutrientViewer.load({ document: "/sales-report.pdf", container: ".foo", licenseKey: "YOUR_LICENSE_KEY",}).then((instance) => { console.log("Successfully mounted NutrientViewer", instance);}).catch((error) => { console.error(error.message);}) Copy
NutrientViewer.load({ document: "/sales-report.pdf", container: ".foo", licenseKey: "YOUR_LICENSE_KEY",}).then((instance) => { console.log("Successfully mounted NutrientViewer", instance);}).catch((error) => { console.error(error.message);})
Creates a new NutrientViewer instance.
Returns a Promise resolving to a new NutrientViewer.Instance, or rejecting with a NutrientViewer.Error.
It requires a configuration object. When the configuration is invalid, the promise will be rejected with a NutrientViewer.Error.