From 4f4d3a058309f6e8d87887b48f6e468184c3556f Mon Sep 17 00:00:00 2001 From: Gabriel Poma Date: Thu, 20 Apr 2023 15:11:33 +0200 Subject: [PATCH] fix enregistrement --- public/js/metadata.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/js/metadata.js b/public/js/metadata.js index 3b01c9b..1a4abbe 100644 --- a/public/js/metadata.js +++ b/public/js/metadata.js @@ -127,10 +127,9 @@ const save = async function () { const arrayBuffer = await pdffile.arrayBuffer() const pdf = await PDFDocument.load(arrayBuffer) - console.log(pdf.getInfoDict()) pdf.getInfoDict().set(PDFName.of('fooMetadata'), PDFHexString.fromText("test de métadonéé")) - const newPDF = new Blob([pdf.save()], {type: "application/pdf"}) + const newPDF = new Blob([await pdf.save()], {type: "application/pdf"}) DL = function (d,f) { let a = document.createElement("a"), u = URL.createObjectURL(d);