appscript pdf-lib integration

28 views Asked by At

I am trying to render acroforms for user to fill fields and save in appscript web app using PDF-lib. The iframe is getting blocked in chrome and edge. But it working in firefox. I tried to use pdf.js library but it is not working in appscript for acroforms with viewer.html both adding files and also using cdn. Can anyone suggest how effectively it can be handled?

I tried pdf.js and pdf-lib integration with appscript I am able to work pdf-lib in firefox

`   <iframe id="pdf" style="width: 90%; height: 90%;"></iframe>
     async function loadPdf() {
     google.script.run.withSuccessHandler(base64ToArrayBuffer).getPDFfileAsBase64();
     // Fetch an existing PDF document.
     // Load a `PDFDocument` from the existing PDF bytes.
         var base =base64string;
        return await PDFDocument.load(base64ToArrayBuffer(base));`
0

There are 0 answers