Copy link to clipboard
Copied
I have several pdf fillable forms, and they contain javascript code.
When sent it to users using Adobe Acrobat on (Mac), these codes don't work!;
When sent it to users using Adobe Acrobat on (Windows), these codes work.
If there is a solution to make the code work perfectly in a Mac environment, that would be great.
But I think this is difficult, and because these forms, in the end, will be filled in, and then returned to the sender, who has a Windows system is there a (document-level-code) or a button code, to make the form (that the Mac users send) to refrest its code as soon as it is received?
Because when I receive the file some fields are empty, so I have to press again on check boxes, or re-enter the data again to make the code works.
I tried this code in the document level, but it did not work:
calculateNow()
In my form I have some calculations and this code:
this.getField("a_1").checkThisBox(0, (event.value == 3));
this.getField("a_2").checkThisBox(0, (3 < event.value) && (event.value < 6 ));
this.getField("a_3").checkThisBox(0, (event.value == 6));
this.getField("a_4").checkThisBox(0, (6 < event.value) && (event.value < 9 ));
this.getField("a_5").checkThisBox(0, (event.value == 9));
this.getField("a_6").checkThisBox(0, (9 < event.value) && (event.value < 11 ));
this.getField("a_7").checkThisBox(0, (event.value == 11));
this.getField("a_8").checkThisBox(0, (11 < event.value) && (event.value < 14 ));
this.getField("a_9").checkThisBox(0, (event.value == 14));
this.getField("a_10").checkThisBox(0, (14 < event.value) && (event.value < 17 ));
this.getField("a_11").checkThisBox(0, (event.value == 17));
this.getField("a_12").checkThisBox(0, (17 < event.value) && (event.value < 19 ));
this.getField("a_13").checkThisBox(0, (event.value >= 19));
Note: Some text-fields contain both codes and calculations (equations) at the same time
THANK YOU♥
Cheers,
Saher
Copy link to clipboard
Copied
This will work in Acrobat Reader and Adobe Acrobat on Windows or Mac.
Copy link to clipboard
Copied
What calculations does you use?
Copy link to clipboard
Copied
Very short, Picking fields to sum them
Copy link to clipboard
Copied
Where does you use the posted script?
Copy link to clipboard
Copied
Custom validation script
Copy link to clipboard
Copied
This will work in Acrobat Reader and Adobe Acrobat on Windows or Mac.
Copy link to clipboard
Copied
In fact it was iOS (iPad and iPhone), not macOS
This means that there is a difference
But why do the codes or the calculations freeze when the file is sent to me? And I have to refresh them manually by clicking on some check boxes!
Copy link to clipboard
Copied
May be that the form was filled with a other app.
Copy link to clipboard
Copied
Acrobat JavaScript is the same on Mac. Have you tested it yourself on a Mac?
A common problem on Mac is that users open in the system app "Preview" rather than Acrobat. Ask for a screen shot of the complete screen including menu bar to check this. The app name is at top left.
Copy link to clipboard
Copied
In fact I did not test it myself, that's a good point, gonna ask them
Copy link to clipboard
Copied
They told me they used it on iOS (iPad and iPhone), not macOS, but in Adobe Reader
Copy link to clipboard
Copied
I found this answer:
I did not know that there is a difference between iOS and macOS regarding Adobe Reader.
So the problem is that the forms fillied in using Adobe Acrobat installed on iOS (iPad) or (iPhone), then the user sends the forms again to me, the JavaScript codes remain, but it seems frozen, so I have to click on some checkboxes to force the codes to run.
I did not test it on macOS yet, but I think it will work
So is there a code which I can run it using a button to refresh the codes and calculations again in my Windows system?

