// This function will be called in the ShowEnvelope.razor page // and will trigger loading of the Editor Interface function loadPDFFromUrl(container, url) { console.log("Loading PSPDFKit.."); console.log(PSPDFKit); fetch(url, { credentials: "include" }) .then(res => res.arrayBuffer()) .then(arrayBuffer => PSPDFKit.load({ container: container, document: arrayBuffer })) .then(instance => { console.log("PSPDFKit loaded", instance) configurePSPDFKit(instance); }) .catch(error => { console.error(error.message); }); } function configurePSPDFKit(instance) { console.log(instance); }