Hi - My objective is to use two LPR printers and send multiple pdfs to each printer based on the sum of the file size without using a datamapper.
For example - I have approx. 5000 pdfs in a folder. I have one printer I want to send 20,000kb’s and the other printer I want to send 15,000 at one time. I need to basically load balance the printers as one prints faster then the other. So, I want it to look in the folder with the 5000 pdfs. Grab how ever many pdfs until the file size equals 20,000kb and send to one printer. then I want it to look at the next set of pdf’s and grab enough pdf’s to equal 15,000kb and send to the other printer. Keep doing this alternating printers until the folder is empty. And they need to print duplex.
Is there a way to do this?
Thank You
You could do this as follow:
- set 2 variables as so:
- totalSize = 0
- printerSelect = printer1
- use the Folder Listing plugin as an action, that will generate an XML file with infos on all files found at a specific location
- use the XML Splitter plugin to split on the node File
- use the Mathematical Operation plugin to increment a totalSize variable with the size of the current file shown in your splitted XML
- add a Text condition plugin to check if you are in printer1 or printer2
- add a Text condition plugin to compare your t_otalSize_ is greater than or equal to your __ threshold for printer1
- if true:
- add a__Set Jobs Infos and Variables that__
- set your printerSelect variable to printer2
- set your totalSize to 0
- add a Folder Capture that grabs all files from a temp folder for printer1 and send them to the printer.
- if false:
- add a Folder Capture that grabs the current file listed in your splitted XML
- add a Send to Folder that move that file from to a temp folder for printer1
- Add the same as step 6 for printer2
Thank you for your response. So, this method will send all files ( that total up to 20kb ) to printer1, then the divert the next set of files ( up to 17kb) to printer2, then back to printer1 with the next set of files (up to 20kb) and so on?
20kb could be approx. 15-20 files and the 17kb would be a few less. It varies.
Thank You
It will…but you have to understand that as long as the limit for size hasn’t been reached for the last batch, no printing will occur. So if on the last batch (whether it goes to printer1 or printer2) we do not reach the size we look for, the last batch won’t print.
You will need to setup another process (let’s call it last batch process that will grabs file from either printer1 or printer2 temp folder and send them to the proper printer.
I suggest a last branch to the current process that drop a trigger file into a folder. That trigger file will be the input for the last batch process, which would handle the last batch. You can transfer along information in the trigger file using the Create File plugin.
These information can then be read by the last batch process. Which printer was on the last batch, etc…