1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

[Editor] Avoid to have duplicated entries in the Annot array when saving an existing and modified annotation

This commit is contained in:
Calixte Denizet 2023-06-15 20:43:57 +02:00
parent 64520a0c63
commit 71479fdd21
4 changed files with 93 additions and 4 deletions

View file

@ -823,6 +823,11 @@ class WorkerMessageHandler {
.ensureXRef("trailer")
.then(trailer => trailer.get("Prev"));
});
handler.on("GetAnnotArray", function (data) {
return pdfManager.getPage(data.pageIndex).then(function (page) {
return page.annotations.map(a => a.toString());
});
});
}
return workerHandlerName;