Page 1 of 1

One job- two prints

Posted: Mon Mar 06, 2017 9:06 pm
by nortizt
Hello,

I have two canon Pixma IP 7250 connected to my RPI. I want to print one copy of an image through each of my printers. I understand I do not need to render the image twice, I could use a filter to send the "job" to the two printers.

Unfortunately I am not quite sure how I could do this or if it is possible.

Thank you for your help!

Re: One job- two prints

Posted: Mon Mar 13, 2017 10:56 am
by zedonet
Hello,

there are several ways to do this and creating a CUPS filter is a possible solution.

I'd create a new filter in /usr/lib/cups/filter that calls the existing TurboPrint filter and catches the printer output, then sends the print job to two print queues.
This would look like the following (the following is not tested and probably contains errors):

Code: Select all

#!/bin/bash
OLDFILTER=/usr/lib/cups/filter/pstoturboprint
if [ -z $6 ] ; then
	$OLDFILTER "$1" "$2" "$3" "$4" "$5" > /tmp/myprintjob
else
	$OLDFILTER "$1" "$2" "$3" "$4" "$5" "$6" > /tmp/myprintjob
fi
lp -d printqueue1 -o raw /tmp/myprintjob
lp -d printqueue2 -o raw /tmp/myprintjob
rm /tmp/myprintjob
Then you need to create a modified version of the printer PPD file /etc/cups/ppd/<printername>.ppd so that the new filter is called (replace every occurence of "pstoturboprint") and then set up a new print queue using lpadmin from a Terminal window

Code: Select all

sudo /usr/sbin/lpadmin -p <printername> -D <printerdescription> -v <printeruri> -P <mynewppd>
The URI can be found in TurboPrint Control, column "URI".

Re: One job- two prints

Posted: Fri Apr 21, 2017 8:00 am
by nortizt
thank you for your help!!