Avatar

Level 10

Mark is right, use the Acroforms print() method instead to control the parameters in the print dialog.

http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf#p...

The only difference ist, that you do not use the keyword „this“ but „event.target“.

AcroForms:

var pp = this.getPrintParams();

pp.interactive = pp.constants.interactionLevel.automatic;

pp.printerName = "hp officejet d series";

this.print(pp);

XFA forms:

var pp = event.target.getPrintParams();

pp.interactive = pp.constants.interactionLevel.automatic;

pp.printerName = "hp officejet d series";

event.target.print(pp);