var App = /** @class */ (function () { function App() { } App.loadPDFFromUrl = function (container, url) { console.log("Loading PSPDFKit.."); fetch(url, { credentials: "include" }) .then(function (res) { return res.arrayBuffer(); }) .then(function (arrayBuffer) { return App.loadPSPDFKit(arrayBuffer, container); }) .then(function (instance) { console.log("PSPDFKit loaded!"); console.log(instance); }) .catch(function (error) { console.error(error.message); }); }; App.loadPSPDFKit = function (arrayBuffer, container) { PSPDFKit.load({ container: container, document: arrayBuffer }); }; return App; }()); export { App }; // This function will be called in the ShowEnvelope.razor page // and will trigger loading of the Editor Interface //const loadPDFFromUrl = function (container: string, url: string): void { // console.log("Loading PSPDFKit.."); // fetch(url, { credentials: "include" }) // .then(res => res.arrayBuffer()) // .then(arrayBuffer => loadPSPDFKit(arrayBuffer, container)) // .then(configurePSPDFKit) // .then(instance => { // console.log("PSPDFKit loaded!") // }) // .catch(error => { // console.error(error.message); // }); //} //# sourceMappingURL=app.js.map