Input:PDF Output:PDF

This commit is contained in:
Anthony Stirling
2023-06-20 23:49:53 +01:00
parent 420e4b6766
commit 5ae2c71c3a
25 changed files with 93 additions and 78 deletions

View File

@@ -218,7 +218,7 @@ const DraggableUtils = {
},
async getOverlayedPdfDocument() {
const pdfBytes = await this.pdfDoc.getData();
const pdfDocModified = await PDFLib.PDFDocument.load(pdfBytes);
const pdfDocModified = await PDFLib.PDFDocument.load(pdfBytes, { ignoreEncryption: true });
this.storePageContents();
const pagesMap = this.documentsMap.get(this.pdfDoc);

View File

@@ -152,7 +152,7 @@ class PdfContainer {
async toPdfLib(objectUrl) {
const existingPdfBytes = await fetch(objectUrl).then(res => res.arrayBuffer());
const pdfDoc = await PDFLib.PDFDocument.load(existingPdfBytes);
const pdfDoc = await PDFLib.PDFDocument.load(existingPdfBytes, { ignoreEncryption: true });
return pdfDoc;
}