print dialog

patrick_kälin__ 05-03-2017

PastedGraphic-1.png

Problem:

How can i out of a life cycle designer Pdf toggle/set

Print dialog Options?

I want to have  «Anpassen» as set when the print dialog opens.

do i have to do it here (see code below)?
Or is there another way for changing print dialog settings ?

if(xfa.form.execValidate() && validateForm()){

  xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);

}

A. Can anyone gibe me a help?
B. Are some people here skilled in programming for further freelance jobs in this LifeCycle Designer Script Programming?
Please let me know. Thanx 🙂

Regards Patrick

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (2)

Answers (2)

radzmar
MVP
06-03-2017

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);