Resuelto
How do I script to have a number like 12.25
How do I script to have a number always with 2 characters left then dot then 2 decimal places
12.25
10.45
12.50
etc...
Thanks
How do I script to have a number always with 2 characters left then dot then 2 decimal places
12.25
10.45
12.50
etc...
Thanks
You can use the util.printf method, for example:
var num = 123.456789;
var num_rounded = util.printf("%.2f", num); // results in 123.46
More information is in the Acrobat JavaScript reference.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.