Skip to main content
Participant
March 31, 2016
Answered

Change the output format of a number with JavaScript (Acrobat X)

  • March 31, 2016
  • 1 reply
  • 1424 views

Hi all,

Depending on the formatting script the representation of a number is necessary to change.

This means: if the formatting script of the field is "AFNumber_Format \ (2,3,3,0, \" \ "false \)" it should be changed to "AFNumber_Format \ (2,1,1,0, \" \ "false \) ".

Par ex: 1,23 -> 1.23.

Fragment:

var f = this.getField("xyz") ;

if ((f.???? == "AFNumber_Format\(2,3,3,0, \"\", false\)") ) {

f.setAction ("Format", "AFNumber_Format\(2,1,1,0, \"\", false\);");

}

How can I read the contents of the formatting script?

Any ideas?

This topic has been closed for replies.
Correct answer try67

Not possible to do in Acrobat using a script.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 31, 2016

Not possible to do in Acrobat using a script.

Participant
April 5, 2016

Thank you for your fast response!