Hi,
in a dynamic form i am catching all user fired print events in the Form::prePrint event with xfa.event.cancelAction = 1, change the print settings to my defaults and start a print job. Until here it works fine.
But: Triggered by xfa.event.cancelAction = 1 Acrobat opens a messagebox "Print canceled" before it starts my print job. I can dismiss the messagebox and the code runs like planned, but this messagebox is very anoying.
Does anyone know if there's a possibilty to surpress that messagebox? I can't find anything in the official documents.
Here is the complete code:
Form::prePrint - (JavaScript, client)
//prevent printing
xfa.event.cancelAction = 1;
// get print settings from acrobat
var pp = event.target.getPrintParams();
// shrink to fit
pp.pageHandling = pp.constants.handling.shrink;
// duplex
var nRtn = xfa.host.messageBox("Soll dieses Formular im Duplexmodus gedruckt werden?", cProjekttitel.value, 2, 2);
if (nRtn == 4){pp.DuplexType = pp.constants.duplexTypes.DuplexFlipLongEdge;}
// print
event.target.print(pp);
Regards,
Axel
Solved! Go to Solution.
Views
Replies
Total Likes
Unfortunately you can't suppress that abort message.
Unfortunately you can't suppress that abort message.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies