Hello,
I need that my PDF form
only can be printed if the validation is correct.
It's the Designer code: -------- Form1.subform.myPrintButton::click - (JavaScript, client) ---------if (...) {// validations are OK xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);} else { // then not print!}
--------------------------------------
If I establish the PDF's security in order that it couldn't be printed, the xfa.host.print sentence doesn't work.
I have been looking for at the Acrobat JavaScript Reference and I haven't found anything that solve this.
On the other hand,
app.hideToolbarButton and
app.hideMenuItem methods,
throws NotAllowedError, and I wouldn't like to have to ask every client that download the pdf that installs a *.js file to give them permissions to
hide/show the impression button .
Could I use the prePrint and postPrint events in order to cancel, or allow the form printing ?
It is really possible to offer to the user that the only way to print the PDF form will be from my custom print button?
Thanks a lot in advance!,
DaN