diff --git a/public/js/metadata.js b/public/js/metadata.js index d6bf4a3..39f8f26 100644 --- a/public/js/metadata.js +++ b/public/js/metadata.js @@ -163,8 +163,7 @@ async function save() { const PDFHexString = window['PDFLib'].PDFHexString const PDFName = window['PDFLib'].PDFName - const arrayBuffer = await pdffile.arrayBuffer(); - const pdf = await PDFDocument.load(arrayBuffer); + const pdf = await PDFDocument.load(await pdffile.arrayBuffer(), { ignoreEncryption: true, password: "" }); deletedMetadata.forEach(function (el) { pdf.getInfoDict().delete(PDFName.of(el))