Hide instructional text when printing hard copy


i have following scripts in acrobat pdf document field properties instructional text appear when blank, , disappears if user types in field.  after filling out form, print hard copy, , wherever there blank field, instructional text prints too.  how can prevent printing?   thank in advance help!

 

// custom format script text field

if (!event.value) {

  1. event.value = "instructional text goes here";
  2. event.target.display = display.noprint;

} else {

  1. event.target.display = display.visible;

}

 

// on focus script:

if (event.target.value==event.target.defaultvalue) {

  1. event.target.value = "";
  2. event.target.textcolor = ["rgb", 0/255, 153/255, 51/255]; 
  3. event.target.textfont = "myriadpro-regular";
  4. event.target.textsize = 0;

}

 

// on blur script:

if (event.target.value=="") {

  1. event.target.value = event.target.defaultvalue;
  2. event.target.textcolor = color.gray;
  3. event.target.textfont = "myriadpro-it";
  4. event.target.textsize = 0; // means auto

}

if lines of code include "a.", "b.", etc, each of scripts should generate errors. first script should be:

 

// custom format script text field

if (!event.value) {

    event.value = "instructional text goes here";

    event.target.display = display.noprint;

} else {

    event.target.display = display.visible;

}



More discussions in JavaScript


adobe

Comments

Popular posts from this blog

Soustraire une selection

After Effects: could not find dvaeve_dialogs.txt

Illustrator cs6 "Invalid Serial Number"