diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index f9ffa315f2..9448a1c4cd 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -1103,6 +1103,19 @@ class ReaderInstance { } return; } + // Save rendered image when annotation isn't modified + case 'saveImage': { + let { annotation } = message; + let { image, id: key } = annotation; + let attachment = Zotero.Items.get(this._itemID); + let libraryID = attachment.libraryID; + let item = Zotero.Items.getByLibraryAndKey(attachment.libraryID, key); + if (item) { + let blob = this._dataURLtoBlob(image); + await Zotero.Annotations.saveCacheImage({ libraryID, key }, blob); + } + return; + } case 'setState': { let { state } = message; await this._setState(state); diff --git a/pdf-reader b/pdf-reader index f720ff8348..590af78005 160000 --- a/pdf-reader +++ b/pdf-reader @@ -1 +1 @@ -Subproject commit f720ff8348cfe2b0b548fe9683e02523ef2f378b +Subproject commit 590af780053f198838c0f3b4afa3f197ef45453e