JS - Avoid a popup to ask for specific version of Acrobat

Embedded JS in PDF keep throwing alert reagdring specific version of Acrobat (Spanish and version 5.0 or greater).
This happens because:
- JS in pdf is enabled
- PDF contains some unsupported features (e.g. XFA)
Alert come when app.formVersion = undefined || app.formVersion < 5.0
In pdf.js we were using FORM_VERSION = undefined. After researching based on https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_jsapiref.pdf\#G4.1993509 and Acrobat DC we decided to go with the larger number to avoid unnecessary popups.
Through investigation we realise that VIEWER_VERSION should have same value - a number.
Due to all that, we implemented 21.00720099 as a value for both FORMS_VERSION and VIEWER_VERSION
This commit is contained in:
Jane-Kotovich 2021-10-29 10:40:36 +10:00
parent 0e7614df7f
commit 12f89d2ab1

View File

@ -21,8 +21,8 @@ import { Thermometer } from "./thermometer.js";
const VIEWER_TYPE = "PDF.js";
const VIEWER_VARIATION = "Full";
const VIEWER_VERSION = "10.0";
const FORMS_VERSION = undefined;
const VIEWER_VERSION = 21.00720099;
const FORMS_VERSION = 21.00720099;
class App extends PDFObject {
constructor(data) {