Copy link to clipboard
Copied
Hi everyone,
Wondering if anyone can help me get a fillable PDF I've made to work properly on a mobile device. It's a simple form with a fiew text fields, drop-downs and check boxes. Everything works well when it is opend from an email on a mobile device except the auto filling date field. The script works fine when I open the pdf on my desktop (MacBook), and fills the current date, but when I email it to myself to use on my phone the date field is simply blank.
Any ideas what needs to be done to make it work? My backup plan is to simply use a dropdown date instead, but an autofilling field would be much better.
Thanks
Copy link to clipboard
Copied
Scripts are not very well supported on mobile.
Copy link to clipboard
Copied
+++EDITED REPLY, corrected "util.prinf" to "util.printd".
See this answer from Try67 :
In addition, see also in this reference, JavaScript APIs and Forms what built-in formats may apply to your Acrobat form when used with an Android or iOS mobile device.
++Adding to the discussion,
If you're using a script share it; it is easier to assist you.
Nevertheless, I've experienced the same issue myself with some of my own PDFs.
I've observed that the font type used by the desktop version is different than that of what a mobile device can display.
If that would be the case try a different font type. Also, if the date field object is too small it will create problems as well.
Making the date field a little bigger allows for all the date text string to display properly in the mobile device(s).
I've observed that When the dimensions of the date field object are too short or too tight for text to display a date it throws date display errors.
But if none of these observations apply to your case, then watch for the date format used in your script via "util.printd()" funtction.
In which case, You'll need to use in your script the same date format as one of the Acrobat's built-in date category formats like, for example: mm/dd/yyyy.
That said, refer to this guidance from ACP Thom Parker:
See if the line of script that you're currently using with the util.scand() function is converting the date into the appropriate date data object before the util.printd() function is applied.