From db925cd1e8f9f39ecff4bfe8d70a0338e6902fe1 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 16 Nov 2022 15:38:00 +0300 Subject: [PATCH] [DE] Send settings for first printing page --- apps/documenteditor/main/app/controller/Print.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Print.js b/apps/documenteditor/main/app/controller/Print.js index d6acb6ee5..a94c81490 100644 --- a/apps/documenteditor/main/app/controller/Print.js +++ b/apps/documenteditor/main/app/controller/Print.js @@ -491,10 +491,11 @@ define([ else if (this.printSettings.cmbRange.getValue()==='current') this._state.firstPrintPage = this._navigationPreview.currentPage; + var size = this.api.asc_getPageSize(this._state.firstPrintPage); this.adjPrintParams.asc_setNativeOptions({ pages: this.printSettings.cmbRange.getValue()===-1 ? this.printSettings.inputPages.getValue() : this.printSettings.cmbRange.getValue(), - paperSize: this._state.pgsize, //this.api.asc_getPageSize(this._state.firstPrintPage), - paperOrientation: this._state.pgorient ? 'portrait' : 'landscape' // this.api.asc_getPageOrient(this._state.firstPrintPage) ? 'portrait' : 'landscape' + paperSize: size ? [size['W'], size['H']] : size, + paperOrientation: size ? (size['H'] > size['W'] ? 'portrait' : 'landscape') : null }); this._isPrint = print;