diff --git a/chrome/content/zotero/reader.xul b/chrome/content/zotero/reader.xul
index f0108a4887..3266cef0a7 100644
--- a/chrome/content/zotero/reader.xul
+++ b/chrome/content/zotero/reader.xul
@@ -69,6 +69,25 @@
+
+
+
+
diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js
index b2e410a526..1dede8d930 100644
--- a/chrome/content/zotero/xpcom/reader.js
+++ b/chrome/content/zotero/xpcom/reader.js
@@ -389,6 +389,18 @@ class ReaderInstance {
}
return;
}
+ else if (cmd === 'rotateLeft') {
+ await this._rotateCurrentPage(270);
+ return;
+ }
+ else if (cmd === 'rotateRight') {
+ await this._rotateCurrentPage(90);
+ return;
+ }
+ else if (cmd === 'rotate180') {
+ await this._rotateCurrentPage(180);
+ return;
+ }
else if (cmd === 'splitVertically') {
this._splitVertically();
}
@@ -610,6 +622,13 @@ class ReaderInstance {
return `data:image/svg+xml,`;
}
+ async _rotateCurrentPage(degrees) {
+ let pageIndex = this._iframeWindow.wrappedJSObject.PDFViewerApplication.pdfViewer.currentPageNumber - 1;
+ this._postMessage({ action: 'reloading' });
+ await Zotero.PDFWorker.rotatePages(this._itemID, [pageIndex], degrees, true);
+ await this.reload({ rotatedPageIndexes: [pageIndex] });
+ }
+
_splitVertically() {
if (this.isSplitVerticallyActive()) {
this._iframeWindow.wrappedJSObject.unsplitView();
diff --git a/chrome/locale/en-US/zotero/zotero.dtd b/chrome/locale/en-US/zotero/zotero.dtd
index 35bb63b9c1..f924ed9407 100644
--- a/chrome/locale/en-US/zotero/zotero.dtd
+++ b/chrome/locale/en-US/zotero/zotero.dtd
@@ -326,3 +326,6 @@
+
+
+