Expand my Community achievements bar.

SOLVED

How to add warning message while using 'print' function in Adobe LiveCycle Designer

Avatar

Level 2

I am trying to make pdf document for my company which requires adding a warning message while anyone use 'print' function from the page...

Does anyone know how to add warning message on LiveCycle Designer

Also my supervisor mentioned something using 'nag' if that rings any bell

1 Accepted Solution

Avatar

Correct answer by
Level 7

Not in the XML code, in the prePrint script event of the print button. If you don't have the script editor up on your version of Designer you can press ctrl + shift + F5 to bring it up.

View solution in original post

10 Replies

Avatar

Former Community Member

You can add a message to the prePrint event that woudl display a message and then print.

The command you want is:

xfa.host.messageBox("This is my message!")

Paul

Avatar

Level 2

So are you saying that I need to go to 'XML Source' and add command line.......and if that so then how would I know where to enter that command?

Is there any function that directly does that?

Thanks for yr help in advance

Avatar

Correct answer by
Level 7

Not in the XML code, in the prePrint script event of the print button. If you don't have the script editor up on your version of Designer you can press ctrl + shift + F5 to bring it up.

Avatar

Former Community Member

No you shoudl never go into the XML source unless uinstricted to do so.

You can open the script editor (under the window menu). It will appear above the drawing area but below the toolbars. You can resize it if there is not enough room. When you click on an object in the form you can choose an event to script against in the Show dropdown. In your case you will want to choose the prePrint event. A line will show up that indicates the object that is associated with the script as well as the event and other information. Add your script below this line. Once that is done you are finished and your form is ready for testing.

Paul

Avatar

Level 7

I don't know if you can change it or not but the points for this thread should go to Paul, I was just clarifying his solution for you.

Avatar

Level 2

I dont think I can change it now..............but yes Thanks Paul......It was your idea that worked

and thanks about XML code info

Avatar

Level 2

So now I know about how to do that for 'Print' button in LC Designer but is there also an option to do that while using 'ctrl +p' or just print icon.

If not, how would I add warning message there?

Avatar

Former Community Member

If the code is on the prePrint event it shodul work no matter how you invoke the print.

paul

Avatar

Level 2

No, thats the problem. The message only works for the added 'print button' from LC Designer

And it doesnt work for Ctrl+p or when you click on print icon?

hope you know how to solve it