From b2c4d7dcbe9677c7fc9c71ba2d8d5603207becb6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 21 Oct 2024 14:41:08 +0300 Subject: [PATCH] Set pdf viewer option --- apps/documenteditor/embed/js/ApplicationController.js | 1 + apps/documenteditor/mobile/src/controller/Main.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 283a10b236..648ea9309e 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -671,6 +671,7 @@ DE.ApplicationController = new(function(){ appOptions.isOForm = !!(type && typeof type[1] === 'string'); // oform and docxf api.asc_setViewMode(!appOptions.canFillForms); + api.asc_setPdfViewer(!appOptions.canFillForms); btnSubmit = $('#id-btn-submit'); diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx index 6b195e0039..2458733714 100644 --- a/apps/documenteditor/mobile/src/controller/Main.jsx +++ b/apps/documenteditor/mobile/src/controller/Main.jsx @@ -567,6 +567,7 @@ class MainController extends Component { applyMode (appOptions) { this.api.asc_enableKeyEvents(appOptions.isEdit); this.api.asc_setViewMode(!appOptions.isEdit && !appOptions.isRestrictedEdit); + this.appOptions.isCorePDF && this.api.asc_setPdfViewer(!appOptions.isEdit && !appOptions.isRestrictedEdit); appOptions.isRestrictedEdit && appOptions.canComments && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments); appOptions.isRestrictedEdit && appOptions.canFillForms && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms);