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

Acrobat Print / Javascript Print

tgoodman
Registered: Aug 18 2008
Posts: 72
Answered

Hi,

I've been searching through the forums and have a question that has been partially answered, but does not appear clearly to solve the problem.

Printing:

I have a form which has a Print Button Object on it. The user can press this, and (from the click event) it will perform custom validation and initiate printing if validation succeeds (using a call to xfa.host.print).

However ... a User can still press Ctrl-P, or press the Print button in Acrobat.

Can I cancel Ctrl-P if Custom validation fails? The PrePrint event is not cancelable (I can only hide form elements from printing).

I can disable Printing in the Acrobat properties (by setting security), but this appears to also disable printing from my Print Button Object (javascript xfa.host.print).

Any thoughts? How do other people tackle this issue on Production forms?

Thanks,
Tim

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
No can not disable the print function nor stop it once it is started except by by the print ui. Acrobat and LiveCycle Designer both provide a hook for some scripting before the print process begins, so one could show a field or stamp about the form not being valid or have a solid field, currently hidden, made visible and covering the form pages.

George Kaiser

tgoodman
Registered: Aug 18 2008
Posts: 72
Thanks. That's what I was led to understand.

It's a frustrating feature, that we can't control exactly when the form gets printed, but at least the PrePrint allows some control over the feature.