Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Eliminate printing Border for Text Field???

Avatar

Level 5
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.
3 Replies

Avatar

Former Community Member
If you use the standard border (for example), you can use the JavaScript prePrint and postPrint for each field to make the border visible, and hidden. Here's how.



1.) Highlight Text Field in Designer.



2.) In the Script Editor, select the prePrint Event from the dropdown list on the top left. (This works in FormCalc or Javascript, although I tend to use JavaScript as the language in the right hand drop down)



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'.



Cheers!

Jay

Avatar

Former Community Member
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):



$.ui.#textEdit.border


I've attached a sample for which demonstrates how to temporarily hide the Appearance border when a form is printed.



Stefan

Adobe Systems

Avatar

Level 1

Hello

I have Adobe Acrobat 8 Professional

I tried to add the two javascript lines but it didn't work, is it because i have a new version of Adobe or i am I doing smthg wrong?

Please help

Thank you