From ecd45cc9af53f97146298576fe5daaf489dac22b Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 24 Feb 2021 15:46:03 +0100 Subject: [PATCH] JS - Avoid a popup to ask for updating Acrobat. - this popup appears because js is enabled; - and because the pdf contains some unsupported features (e.g. XFA); - can be tested with: https://www.cbsa-asfc.gc.ca/publications/forms-formulaires/a10.pdf. --- src/scripting_api/initialization.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/scripting_api/initialization.js b/src/scripting_api/initialization.js index 0d7c077aa..17f36e577 100644 --- a/src/scripting_api/initialization.js +++ b/src/scripting_api/initialization.js @@ -115,6 +115,12 @@ function initSandbox(params) { globalThis.trans = Trans; globalThis.zoomtype = ZoomType; + // Avoid to have a popup asking to update Acrobat. + globalThis.ADBE = { + Reader_Value_Asked: true, + Viewer_Value_Asked: true, + }; + // AF... functions const aform = new AForm(doc, app, util, color); for (const name of Object.getOwnPropertyNames(AForm.prototype)) {