diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js
index 9b869fb017..71905d7991 100644
--- a/apps/spreadsheeteditor/main/app/controller/Print.js
+++ b/apps/spreadsheeteditor/main/app/controller/Print.js
@@ -297,6 +297,7 @@ define([
onShowMainSettingsPrint: function() {
this._changedProps = [];
+ this.printSettings.$previewBox.removeClass('hidden');
if (!this.isFillSheets) {
this.isFillSheets = true;
@@ -306,10 +307,15 @@ define([
this.fillPrintOptions(this.adjPrintParams, false);
var pageCount = this.api.asc_initPrintPreview('print-preview');
- this.updateNavigationButtons(0, pageCount);
- this.printSettings.txtNumberPage.checkValidate();
- this._isPreviewVisible = true;
+ this.printSettings.$previewBox.toggleClass('hidden', !pageCount);
+ this.printSettings.$previewEmpty.toggleClass('hidden', !!pageCount);
+ if (!!pageCount) {
+ this.updateNavigationButtons(0, pageCount);
+ this.printSettings.txtNumberPage.checkValidate();
+
+ this._isPreviewVisible = true;
+ }
},
openPrintSettings: function(type, cmp, format, asUrl) {
diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
index 6dc6dfe064..3b4e313fde 100644
--- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
+++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js
@@ -2349,6 +2349,9 @@ define([
'',
'',
'',
+ '
',
+ '
<%= scope.txtEmptyTable %>
',
+ '
',
''
].join('')),
@@ -2648,6 +2651,9 @@ define([
this.$el.on('click', '#print-header-footer-settings', _.bind(this.openHeaderSettings, this));
this.$headerSettings = $('#print-header-footer-settings');
+ this.$previewBox = $('#print-preview-box');
+ this.$previewEmpty = $('#print-preview-empty');
+
if (_.isUndefined(this.scroller)) {
this.scroller = new Common.UI.Scroller({
el: this.pnlSettings,
@@ -2828,7 +2834,8 @@ define([
txtPage: 'Page',
txtOf: 'of {0}',
txtSheet: 'Sheet: {0}',
- txtPageNumInvalid: 'Page number invalid'
+ txtPageNumInvalid: 'Page number invalid',
+ txtEmptyTable: 'There is nothing to print because the table is empty'
}, SSE.Views.PrintWithPreview || {}));
});
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index 816e3b44ea..820634116a 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -2783,6 +2783,7 @@
"SSE.Views.PrintWithPreview.txtSettingsOfSheet": "Settings of sheet",
"SSE.Views.PrintWithPreview.txtSheet": "Sheet: {0}",
"SSE.Views.PrintWithPreview.txtTop": "Top",
+ "SSE.Views.PrintWithPreview.txtEmptyTable": "There is nothing to print because the table is empty",
"SSE.Views.ProtectDialog.textExistName": "ERROR! Range with such a title already exists",
"SSE.Views.ProtectDialog.textInvalidName": "The range title must begin with a letter and may only contain letters, numbers, and spaces.",
"SSE.Views.ProtectDialog.textInvalidRange": "ERROR! Invalid cells range",
diff --git a/apps/spreadsheeteditor/main/resources/less/leftmenu.less b/apps/spreadsheeteditor/main/resources/less/leftmenu.less
index bbd690c39b..67dafde381 100644
--- a/apps/spreadsheeteditor/main/resources/less/leftmenu.less
+++ b/apps/spreadsheeteditor/main/resources/less/leftmenu.less
@@ -520,6 +520,24 @@
#panel-print {
padding: 0;
+ #print-preview-empty {
+ padding: 14px;
+ color: @text-tertiary-ie;
+ color: @text-tertiary;
+
+ position: absolute;
+ left: 280px;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ div {
+ text-align: center;
+ }
+ }
#id-print-settings {
position: absolute;
width:280px;