pspdfkit global instance unload
let instance = null;
PSPDFKit.load({
document: "/sales-report.pdf",
container: ".foo",
}).then((i) => {
instance = i
})
.then(() => {
// Unload the given instance
PSPDFKit.unload(instance)
}).catch((error) => {
console.error(error.message);
})