A target to unload
When true, an instance of Nutrient Web SDK was unmounted.
let instance = null;
NutrientViewer.load({
document: "/sales-report.pdf",
container: ".foo",
}).then((i) => {
instance = i
})
.then(() => {
// Unload the given instance
NutrientViewer.unload(instance)
}).catch((error) => {
console.error(error.message);
})
NutrientViewer.load({
document: "/sales-report.pdf",
container: ".foo",
})
.then(() => {
// Unload the given instance
NutrientViewer.unload(".foo")
})
Unloads an existing NutrientViewer instance.
It requires an
targetparameter that is a CSS selector, an HTMLElement or the reference to a NutrientViewer.Instance returned by NutrientViewer.load.