Copy link to clipboard
Copied
Hello, I have pdf created in indesign with interactive textfields and checkboxes. In adobe pro I defined default values for that text fields. Also I defined "Will print" script, so defaul values are not printable, if someone not filled up interactive textfields and leave form with default values. Form works perfect on PC, but doest work on smartphone (iOS), so form can not be printed with blank interactive text fields. It cause that it can not be filled with pen after print. Is it be possible to define default values to be visible only on compatible pdf browsers? Or someone have any other solution for my problem?
Script for "will print"
for(var i=0;i<this.numFields;i++) { var oFld = this.getField(this.getNthFieldName(i)); if(oFld.type == "text") oFld.display = (oFld.value == oFld.defaultValue)?display.noPrint:display.visible; }
Copy link to clipboard
Copied
Hi,
If you are looking to have a one solution fits all, I don't think that willwork, as there is no guarentee that all browser/apps will run JavaScript in the same way.
As you appear to be wanting to provide feedback for the the users so they understand what is supposed to go in the field, as you don't appear to want to leave the default values there, it may be better to move the suggested values out of the fields and into the test of the question or something, so there is no requirement for the javascript to be run for printing, or you could provide two variations of the file, one for printing with no defaults, and one for filing in on a computer which has the defaults.
Other than that you could test a couple of applications and make sure the PDF works for those and encourage your uses to use those applications.
Copy link to clipboard
Copied
You can only reliably rely on compatible software, so you have to reverse the logic of the problem: use fields with "empty" or "nothing" as their default value, and use a "Document JavaScript" (which runs when the document is opened) to modify their default values (+ your Will Print script).
So if the software used by the end user does not support JavaScript the fields will always be printed empty.
Copy link to clipboard
Copied
Oh, thank you. I will try that.