Is there a way to do a batch print where you can specify how often the respective pdfs have to be printed. like print the first pdf 100 times, the second 80 and the third only 5 times.
is it possible to automate the process by having the number already in the file name? for example such as 50x_abc.pdf. Basically, you set the print setting once and after this every file is printed.
Yes, that is possible. If you use that pattern for the file name then you can do it like this:
var pp = this.getPrintParams(); pp.printerName = "Enter printer name here"; pp.interactive = pp.constants.interactionLevel.automatic; pp.NumCopies = Number(this.documentFileName.split("_").replace("x", "")); this.print(pp);
This code will print the files automatically. The user will be able to cancel out of the operation, though, in case of any problems.
Wow thank you! You are a greate person.
For me the action would be perfekt if I coulduse it to specify in the Print Menü how i want it to bei printed, such as one-sided grayscale. By Default our printers so everything in color and Duplex and we don't need that very offen.
Try adding these lines before the print command:
pp.colorProfile = "Gray Gamma 2.2";
pp.DuplexType = pp.constants.duplexTypes.Simplex;
Oh Yeah the grayscale one of worked fine, but i think the duplex issue is within the print driver. Do you have any workaroud for that?