These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

SCRIPT FOR TEXT FIELD INVISIBLE BUT PRINT

patra
Registered: Oct 19 2006
Posts: 270
Answered

Hi eneryone

How with a script I can make a field to be invisible but print, without to use the
object properties.

Form users they use Reader 7.0 and when I select from object properties Visible(Print only) works with Reader 8.0 and above, but not with Reader 7.0!

Any idea............

Thanks

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
In the version change from LC 7 to LC 8 there were quite a few changes. One of these was the whole (Visible/Invisible) thing. If you have a copy of LC Deisgner 7 you'll see the the "presense" options are slightly different. Instead of "Visible(Print Only)", it has "Invisible(But Print Anyway)". This is a change in how things are structured internally. Unfortunately the method used for each version does not seem to work on the other version.

So you definately need a code solution that will work for both. Make you field Invisible, not hidden, and place this code in the "PrePrint" event for the field.

this.presence= "visible";

Then put this code in the "PostPrint" event

this.presence= "invisible";

Make sure you change the script language to JavaScript.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script