From: Jeff R. <je...@jr...> - 2007-01-16 03:17:26
|
Hello All When I print an invoice I would like one copy to come out of my inkjet in full colour for the customer and two copies should come out of my laser for filing. Currently I find myself having to print to the inkjet then back up one page, select laser, change the amount to two and print again. I know this is not a lot of work but If I print 1000 invoices this year it's going to drive me nuts. I've tried playing around with the .conf file to create a printer called "invoice" with commands to do this without any luck. Does anyone know the syntax to put two print commands together so they execute one after another? I've tried: Invoice => 'lp -d InkJet, lp -d Simplex -n 2', Invoice => 'lp -d InkJet; lp -d Simplex -n 2', Invoice => 'lp -d InkJet: lp -d Simplex -n 2', Invoice => lp -d InkJet and lp -d Simplex -n 2'. Invoice => lp -d InkJet & lp -d Simplex -n 2', Invoice => lp -d InkJet -d Simplex -n 2', and maybe a couple of others, no luck so far. Jeff Roberts |
From: Roy P <or...@sh...> - 2007-01-16 04:14:24
|
Hello Jeff... Here is an old post from the list: =2D--------- This is ugly but it works, create 2 cups printers, create a samba=20 printer that prints to both of them, create a cups printer that prints=20 to the samba printer. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-->Cups Printer 1 Cups printer 3 -> samba printer / =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\--> Cups Printer 2 The =A0samba printer uses print command =A0=3D =A0lpr -PPrinter1 %s/%f && lpr -P printer2 %s/%f This is roughly how it goes, I made it work on another system years ago,=20 you will have to sort the details. Or you could do a trick with the pipe to printer in sql-ledger.conf =2D-------------------- I didn't get around to try this myself.... Hope this helps. Roy On Monday 15 January 2007 21:11, Jeff Roberts wrote: > Hello All > > When I print an invoice I would like one copy to come out of my inkjet > in full colour for the customer and two copies should come out of my > laser for filing. Currently I find myself having to print to the inkjet > then back up one page, select laser, change the amount to two and print > again. I know this is not a lot of work but If I print 1000 invoices > this year it's going to drive me nuts. > > I've tried playing around with the .conf file to create a printer called > "invoice" with commands to do this without any luck. Does anyone know > the syntax to put two print commands together so they execute one after > another? > > I've tried: > > Invoice =3D> 'lp -d InkJet, lp -d Simplex -n 2', > Invoice =3D> 'lp -d InkJet; lp -d Simplex -n 2', > Invoice =3D> 'lp -d InkJet: lp -d Simplex -n 2', > Invoice =3D> lp -d InkJet and lp -d Simplex -n 2'. > Invoice =3D> lp -d InkJet & lp -d Simplex -n 2', > Invoice =3D> lp -d InkJet -d Simplex -n 2', > > and maybe a couple of others, no luck so far. > > Jeff Roberts > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys - and earn ca= sh > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > sql-ledger-users mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sql-ledger-users |
From: Ashley J G. <sql...@pu...> - 2007-01-16 04:23:48
|
On Tuesday 16 January 2007 13:11, Jeff Roberts wrote: > Hello All > > When I print an invoice I would like one copy to come out of my inkjet > in full colour for the customer and two copies should come out of my > laser for filing. Currently I find myself having to print to the inkjet > then back up one page, select laser, change the amount to two and print > again. I know this is not a lot of work but If I print 1000 invoices > this year it's going to drive me nuts. Hi Jeff, You could create a shell script that reads from standard input (possibly putting it into a temporary file) then sends that data to two or more calls to lp. We run a thermal docket printer at our shop and I use a script that prepends control codes to print our logo, then send the print job, then sends more data to add newlines and fire the cashdrawer. I later modified the script to also keep logs of every docket, so now I have an automatic audit trail of every printed POS docket which has come in handy a number of times for balancing the till or finding other discrepancies. Essentially, all you'd need to do in your script is: ============================== #!/bin/sh #define a temporary file JOB=/tmp/sl-invprint.ps # capture the job into the temp file cat - > $JOB # Now print it however you like, however many times you like lp -d InkJet < $JOB lp -d Simplex -n 2 < $JOB # if you like, archive the print file: cat $JOB > /var/log/invoices/invoicelog-`date +%Y-$m-%d-%H%M.%S`.ps ============================== Then you just put the name of the script into the printer definition in sql-ledger.conf and away you go (eg, if you save that script as /usr/local/bin/invoiceprint then you just define your printer as 'Invoice Printsystem' => 'invoiceprint'). Doing this gives you a great deal of control over how you process printjobs - eg you could use a script that parsed the invoice for fax numbers and faxed a copy of the invoice to the client, or whatever else "behind the scenes" stuff you wanted to do. -- Regards, Ashley J Gittins web: http://www.purple.dropbear.id.au jabber: agi...@pu... |
From: Jeff R. <Jef...@te...> - 2007-01-16 07:02:07
|
Thanks Ashley That seems to have solved it, I did have to add a ctl-D (EOF) to the end of invoice.tex to terminate cat but now it prints all the right copies from all the right printers. Jeff Ashley J Gittins wrote: > On Tuesday 16 January 2007 13:11, Jeff Roberts wrote: > >> Hello All >> >> When I print an invoice I would like one copy to come out of my inkjet >> in full colour for the customer and two copies should come out of my >> laser for filing. Currently I find myself having to print to the inkjet >> then back up one page, select laser, change the amount to two and print >> again. I know this is not a lot of work but If I print 1000 invoices >> this year it's going to drive me nuts. >> > > Hi Jeff, > You could create a shell script that reads from standard input (possibly > putting it into a temporary file) then sends that data to two or more calls > to lp. > > We run a thermal docket printer at our shop and I use a script that prepends > control codes to print our logo, then send the print job, then sends more > data to add newlines and fire the cashdrawer. I later modified the script to > also keep logs of every docket, so now I have an automatic audit trail of > every printed POS docket which has come in handy a number of times for > balancing the till or finding other discrepancies. > > Essentially, all you'd need to do in your script is: > > ============================== > #!/bin/sh > #define a temporary file > JOB=/tmp/sl-invprint.ps > > # capture the job into the temp file > cat - > $JOB > > # Now print it however you like, however many times you like > lp -d InkJet < $JOB > lp -d Simplex -n 2 < $JOB > > # if you like, archive the print file: > cat $JOB > /var/log/invoices/invoicelog-`date +%Y-$m-%d-%H%M.%S`.ps > > ============================== > > Then you just put the name of the script into the printer definition in > sql-ledger.conf and away you go (eg, if you save that script > as /usr/local/bin/invoiceprint then you just define your printer as > 'Invoice Printsystem' => 'invoiceprint'). > > Doing this gives you a great deal of control over how you process printjobs - > eg you could use a script that parsed the invoice for fax numbers and faxed a > copy of the invoice to the client, or whatever else "behind the scenes" stuff > you wanted to do. > > |