diff --git a/chrome/content/zotero/xpcom/pdfWorker/manager.js b/chrome/content/zotero/xpcom/pdfWorker/manager.js index 9a2d1be9d8..cb23029218 100644 --- a/chrome/content/zotero/xpcom/pdfWorker/manager.js +++ b/chrome/content/zotero/xpcom/pdfWorker/manager.js @@ -152,6 +152,8 @@ class PDFWorker { if (!attachment.isPDFAttachment()) { throw new Error('Item must be a PDF attachment'); } + let t = new Date(); + Zotero.debug(`Exporting PDF for item ${attachment.libraryKey}`); let items = attachment.getAnnotations(); items = items.filter(x => !x.annotationIsExternal); let annotations = []; @@ -200,6 +202,8 @@ class PDFWorker { await Zotero.Items.erase(items.map(x => x.id)); } + Zotero.debug(`Exported PDF with ${annotations.length} annotation(s) in ${new Date() - t} ms`); + return annotations.length; }, isPriority); }