Is it possible to display border on the PDF and not print on the output for Text Field??? What settings and/or scripting I need to get this working? A sample form is really appreciated.
1.) Highlight Text Field in Designer.
3.) Type in (or paste) the following code:
this.border.presence = "hidden";
4.) Select the postPrint Event.
5.) Type in (or paste) the following code:
this.border.presence = "visible";
Now when you click print, it will make the outside border hidden, and when you cancel, the border will reappear. Now this will not make the 'Solid Box', or 'Sunken Box' of the text field hidden. The easy way to fix this, is set the 'Appearance' in the Object->Field palette to 'None'.
You can also make what's called the Appearance border in Designer temporarily disappear when printing using the PrePrint and PostPrint events.
The Appearance border is what's called the "UI Border" or the "Content Area Border" in XFA technical terms. That means that the SOM (Scripting Object Model) expression required to access that border is on the field's UI property/node instead of directly on the field. The following is the SOM expression which accesses the field's Appearance border (in FormCalc):
I've attached a sample for which demonstrates how to temporarily hide the Appearance border when a form is printed.