From 9691fcafc2126b61bb806ceb64e5dedccee5b1fb Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Fri, 30 Sep 2022 09:40:35 +0300 Subject: [PATCH] Import external annotations before trying to add a note from annotations --- chrome/content/zotero/zoteroPane.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 932ffef185..c25df396da 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -5043,6 +5043,12 @@ var ZoteroPane = new function() var annotations = []; for (let attachment of attachments) { + try { + await Zotero.PDFWorker.import(attachment.id, true); + } + catch (e) { + Zotero.logError(e); + } annotations.push(...attachment.getAnnotations()); } var note = await Zotero.EditorInstance.createNoteFromAnnotations( @@ -5133,6 +5139,12 @@ var ZoteroPane = new function() continue; } for (let attachment of attachments) { + try { + await Zotero.PDFWorker.import(attachment.id, true); + } + catch (e) { + Zotero.logError(e); + } annotations.push(...attachment.getAnnotations()); } }