These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

this.getField("F1t").value is not right

KyleWang
Registered: Mar 29 2010
Posts: 3
Answered

Dear everyone,
My PDF has 2 text field.
i create the javascript to F1 as below:

this.getField("F2").value = this.getField("F1").value;

But result is not right.

i type "123213123123123123123123123" in F1,but F2's value is "1.2321312312312312e+26"

then
app.alert(this.getField("F1").value),that is "1.2321312312312312e+26";

i can not find eny to fix it.can you help me!?
thank you.

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Make sure your field's format is set to text, not to number.
You can also try using valueAsString instead of value.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Your number is too big for Acrobat JavaScript to handle as a string, so it converts to scientific notation. Acrobat uses the The IEEE 754 standard with a precision of binary 16.

George Kaiser

KyleWang
Registered: Mar 29 2010
Posts: 3
Thank for you helps.