Adobe Acrobat Javascript compatibility

Avatar

Avatar

AmiAdobe

Avatar

AmiAdobe

AmiAdobe

11-12-2020

Hello,

 

can't find a reference of supported Javascript functions for Adobe Acrobat Forms created in LiveCycle.

 

Does PDF javascript supports as example array.push and everything related to Array?

I can't add element to an array.

 

Thak you very much

 

 

View Entire Topic

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

15-12-2020

There's an overview which functions from Acrobat JavaScript API you can use. You'll find it in the scripting basics reference: https://helpx.adobe.com/pdf/aem-forms/6-2/scripting-basics.pdf
Generally you can use any JavaScript function defined by ECMA-262 5th edition, not just the those definded by Acrobat DC JavaScript API: https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf

 

For arrays just use:

 

var aValues = []; // Create an empty array
aValues.push("A new value");
aValues.push("Another new value");

xfa.host.messageBox(aValues.join("\n"));