Skip to main content
Participant
June 10, 2019
Question

Running Document JavaScript in Android

  • June 10, 2019
  • 1 reply
  • 810 views

Hi,

My PDF has a Form field, which gets populated with the current using below document script.

var f = this.getField("Today"); f.value = util.printd("mm/dd/yyyy", new Date());

It works fine in our desktop version of the Acrobat reader. However this script is not running in Samsung Galaxy S4.

From the other posts, I understand that acrobat javascript has limited/no support on android.

Please advise the possible next steps?

1. Does any specific version of android operating system or any specific version of acrobat reader will support this script execution?

2. What are the potential alternatives to set the date field to current date in PDF without using acrobat javascript?

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
June 11, 2019

Are you using the Adobe Reader for Android? That script should work assuming you have it in the right place. Where is the Javascript running from?

Participant
June 12, 2019

Yes I'm using Adobe Reader for Android only.

I'm not sure what exactly you meant by right place.

One correction to my question is that the field I'm quoting is not the FormField, it is the normal field. I'm not sure whether that will make any difference.

Inspiring
June 12, 2019

Your code accesses a from field that may have the read only property so only a script action can update the field.