Hi Everyone,
I am trying to to warn my users of which fields are not validated before they print. I have placed pre-print code (below) to ask the user if they want to validate the form prior to printing. However, when they hit yes, the code should tell the form not to print. It probably does this, but window's print function happens anyways, ignoring the entire issue. Any idea how to override window's print function as well?
Thanks for your help,
Edward Kuk
CODE:
var valid;
var redo = 3; // assume no redo
valid = MainPage.execValidate();
if (!valid) {
redo= xfa.host.messageBox("Do you want to fix the validation errors before printing?", "Question", 2, 2);
}
if (redo != 4) {
// YES = 4, NO = 3, OK = 1, Cancel = 2
//If they chose yes, this overrides the print function
xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
}
[url]http://forms.stefcameron.com/2008/04/13/prevent-printing-pdf-forms-in-acrobat-8/[/url]
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs