Skip to content Skip to sidebar Skip to footer

How To Set Number Of Copies GetPrintParams()

I am trying to add some JS to my pdf creation process to save some time. My goal is to basically click a button generate a PDF and have it print. Right now I have: var pp = this.ge

Solution 1:

I know, this question is old. But I was looking for a solution, too. And I found here, that it should work with the following:

//no of copies
var n = 3;

var pp = this.getPrintParams();

//here is the magic
pp.NumCopies=eval(n);

this.print(pp);

For me, this is working with tcpdf and Adobe Reader.


Solution 2:

Try this

var n = 3;
var pp = this.getPrintParams();
pp.NumCopies=eval(n);
this.print({bUI: false,bSilent: true,bShrinkToFit: true,printParams:pp});

Solution 3:

Not possible, which is a good thing; since otherwise some websites would specify a high number and people who don't expect this would accidentally print lots of pages instead of just a single one.


Solution 4:

You should call print method twice or more times, like the following:

this.print({bUI: false,bSilent: true,bShrinkToFit: true});
this.print({bUI: false,bSilent: true,bShrinkToFit: true});

I think it's not possible to set the number of copies.

See also:


Post a Comment for "How To Set Number Of Copies GetPrintParams()"