diff --git a/apps/documenteditor/main/app/controller/Print.js b/apps/documenteditor/main/app/controller/Print.js index 31fb75b58..d92d4e893 100644 --- a/apps/documenteditor/main/app/controller/Print.js +++ b/apps/documenteditor/main/app/controller/Print.js @@ -281,6 +281,7 @@ define([ this.api.asc_drawPrintPreview(this._navigationPreview.currentPreviewPage); this.updateNavigationButtons(this._navigationPreview.currentPreviewPage, this._navigationPreview.pageCount); this.SetDisabled(); + this._isPreviewVisible = true; }, onPaperSizeSelect: function(combo, record) { @@ -413,7 +414,7 @@ define([ onHidePrintMenu: function () { if (this._isPreviewVisible) { - this.api.asc_closePrintPreview(this._isPrint); + this.api.asc_closePrintPreview && this.api.asc_closePrintPreview(this._isPrint); this._isPreviewVisible = false; } }, @@ -500,12 +501,13 @@ define([ this.isInputFirstChange = true; return; } - + this._isPrint = print; if ( print ) { var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); opts.asc_setAdvancedOptions(this.adjPrintParams); this.api.asc_Print(opts); + this._isPrint = false; } else { var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF); opts.asc_setAdvancedOptions(this.adjPrintParams); @@ -543,7 +545,6 @@ define([ } }, - textWarning: 'Warning', txtCustom: 'Custom', txtPrintRangeInvalid: 'Invalid print range', textMarginsLast: 'Last Custom' diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 469243261..881050d70 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -2654,7 +2654,6 @@ define([ txtPage: 'Page', txtOf: 'of {0}', txtPageNumInvalid: 'Page number invalid', - txtEmptyTable: 'There is nothing to print because the document is empty', txtPages: 'Pages', textMarginsLast: 'Last Custom', textMarginsNormal: 'Normal',