Function load
Function
Type Signature
Type Declaration
Parameters
configurationConfigurationReturns
Example
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);
})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);
})Load an app-provided document with DWS Viewer API
NutrientViewer.load({
container: ".foo",
document: "/sales-report.pdf",
session: "xxx.xxx.xxx",
}).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.