My issue: When an order is processed, the same document needs to be printed on two printers.
My proposed solution: Create a single queue in CUPS with a backend script that spits the job out to the two real printers queues.
My problem: Documentation. Maybe I'm looking at every ring around the bullseye, but I can't find anything that lays out the rules for writing a CUPS backend script.
In the end, I have several questions:
- Is there already an option to do this in CUPS that I've missed?
- The line I use to add my queue is "
lpadmin -p MultiPass -E -v multipass -P Generic PostScript Printer
". But DeviceURI is bad unless I specify a directory like "-v multipass:/tmp
". Why is this? - For testing, my script does nothing but capture ARGV and write it out to a text file one line per argument. Problem is, I'm getting nothing. Logs show the job as successful, but I'm pretty sure my meager attempt at a backend isn't even being run.
I've tried to keep this question brief, so please ask for more info as I'm sure I've left out the most important part in all this. Honestly, I'm just done chasing my own tail. Thank you for your time.
I found a backend called Tea4Cups which is available here. You can poke around in the SVN tree and find earlier versions or a later one.
This page explains the difference between purchasing this script and downloading it for free.
Here's another approach. It uses a shell script to print the document once for each printer and sets up that script as the interface.