mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #14038 from calixteman/saveas
JS - Implement few possibilities with app.execMenuItem (bug 1724399)
This commit is contained in:
commit
ffa2572bdf
2 changed files with 45 additions and 2 deletions
|
@ -479,8 +479,24 @@ class App extends PDFObject {
|
|||
/* Not implemented */
|
||||
}
|
||||
|
||||
execMenuItem() {
|
||||
/* Not implemented */
|
||||
execMenuItem(item) {
|
||||
switch (item) {
|
||||
case "SaveAs":
|
||||
case "FirstPage":
|
||||
case "LastPage":
|
||||
case "NextPage":
|
||||
case "PrevPage":
|
||||
case "ZoomViewIn":
|
||||
case "ZoomViewOut":
|
||||
this._send({ command: item });
|
||||
break;
|
||||
case "FitPage":
|
||||
this._send({ command: "zoom", value: "page-fit" });
|
||||
break;
|
||||
case "Print":
|
||||
this._send({ command: "print" });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
getNthPlugInName() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue