User scripts for O&K Print Router
Starting from version 3.00, O&K Print Router supports user scripts for faster printing and balancing load between multiple printers. The scripts are written in Chaiscript. For more details about this programming language, please visit the ChaiScript official website.
When a document is sent to a printer controlled by O&K Print Router, first the document printing and document forwarding rules defined via the Redirect options are processed. Then O&K Print Router executes the Custom Script if one has been defined:
You can use the following functions in your scripts:
Print("Printer name", Number_of_Copies)– Print the specified number of copies of the document on one printer.
PrintMultiply(Printers_List, Number_of_Copies)– Print the specified number of copies of the document on ALL printers from the list.
PrintBalanced(Printers_List, Number_of_Copies)– Print the specified number of copies of the document on THE MOST AVAILABLE printer from the list.
PrintPages(Printers_List, PaperSize, Color, Number_of_Copies, PrintingMode)- Printing several pages from the document to ALL printers from the list. Page will be print if its parameters are correspond with function arguments PaperSize и Color. PrintingMode: 0 - print by paper size, 1 - print by physical pages dimensions. For example if it is a plot draw.
The following information about the document sent to print is available:
- DocName – The document’s name.
- Pages – The number of pages.
- Copies – The number of copies.
- Color – Color printing mode; 0 – monochrome printing, 1 – color printing.
To define user printing rules, open the Custom Script tab, copy and paste (or type in) your script, and save it. To validate the syntax, click the Test button. (In the test mode, the document will not be actually printed.)
Print a document on different printers depending on paper size:
Print a document on different printers depending on color printing mode:
Print different numbers of copies of a document on different printers:For example, print multiple copies distributing the load between three printers as 20%, 30%, and 50%. That is, send a print job for 10 copies of the document to O&K Print Router, so that 2 copies are printed on HP LaserJet 9000 PCL6, 3 copies on Brother DCP-7070DW, and 5 copies on Xerox WorkCentre Pro 275. To do it, create the following printing script: