Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
You can do it by just having the Action open the Print dialog, and then specifying in it the number of copies for each file. You can do it by executing this JavaScript code:
this.print();
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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("_")[0].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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Try adding these lines before the print command:
pp.colorProfile = "Gray Gamma 2.2";
pp.DuplexType = pp.constants.duplexTypes.Simplex;
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
No, sorry.