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

Print Button to show/hide text boxes

jim0168
Registered: May 14 2008
Posts: 6

Hi, I'm new to acrobat JS and wanted to find out how to setup a print button script that will show text boxes that are hidden but printable. I've already setup a print button that executes the print function and at the same time, I want to print text boxes that are hidden but printable. Is there another way of doing this by scripting other than using hide/show field?

Can it be something close to this? Script does not work.

var show = event.target.isButtonPush(0) ?display.visible:display.hidden;
this.getField("Text9").display = show

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
First, text boxes are comments/annotations and the print property can be set with JavaScript, but one still has to select the printing of comments/annotations/markups in the Print UI. It wold be far easier and reliable to use form fields and set the property to "Print but not visible".

George Kaiser

jim0168
Registered: May 14 2008
Posts: 6
Yes, I agree it would be easier to have property set as "Print but not visible". At the same time, there are 2 different text boxes depending on which print button users chose. Should they chose one, textbox 9 will print. Should they chose 2, textbox 9 won't print but textbox 10 will.

Rather than creating 2 different forms, it is possible to add a script to do that?