Copy link to clipboard
Copied
Hello all,
I am trying to add a math formula to a Fillable pdf and I am running into some issues. I have taken a formula from excel and need it to work inside of this pdf with no luck. I've got this portion of the formula to work: G29*((G30-G28)/(G30-G31)) I need this equation taken to the power of 0.54. Is there anyone who can help me with this?
Copy link to clipboard
Copied
OK, then you must switch to using a script, such as this one (note you must also take into account the situation where G30 equals G31, to avoid division by zero):
var G28 = Number(this.getField("G28").valueAsString);
var G29 = Number(this.getField("G29").valueAsString);
var G30 = Number(this.getField("G30").valueAsString);
var G31 = Number(this.getField("G31").valueAsString);
var v1 = (G30-G31);
if (v1==0) event.value = "";
else {
var v2 = (G30-G28);
var v3 = G29*(v2/v1);
event.value = Math.pow(v3, 0.54);
}
Copy link to clipboard
Copied
Ah, OK, that makes more sense... Then change these two lines:
var v3 = G29*(v2/v1);
event.value = Math.pow(v3, 0.54);
To:
var v3 = (v2/v1);
event.value = G29*Math.pow(v3, 0.54);
Copy link to clipboard
Copied
I installed Adobe Acrobat Reader on another computer, opened my form, and you are correct, the math formulas do work with that product. Thanks!!
Copy link to clipboard
Copied
With the document open in PDF Reader, and I click PDF Reader and About PDF Reader I get this:
Copy link to clipboard
Copied
That's not Adobe Acrobat Reader...
Copy link to clipboard
Copied
Oh, OK. However, I tried to download it and install and it said it found a newer version (Acrobat Pro) so it wouldn't let me install the reader.
Copy link to clipboard
Copied
I installed Adobe Acrobat Reader on another computer, opened my form, and you are correct, the math formulas do work with that product. Thanks!!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now