Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Mar 31, 2016 Mar 31, 2016

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?

TOPICS
Acrobat SDK and JavaScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 31, 2016 Mar 31, 2016

Not possible to do in Acrobat using a script.

Translate
Community Expert ,
Mar 31, 2016 Mar 31, 2016

Not possible to do in Acrobat using a script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 05, 2016 Apr 05, 2016
LATEST

Thank you for your fast response!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines