Hi All, I've got a very nicely working samba server with cups as the backend. i also have a colour printer on which I must do billing every month. i've done a test page or two and the username comes though to the colour printer which is good. problem i had is the jobname in the logs is smbprn_xxxxxxxx_xx (numbers) which is the samba job name. if joe bloggs complains and says he didn't print that many jobs, we've no way of saying here's what you printed with samba because it's not recognizable to them. sad. Does anybody know anything about how the jobname gets crunched etc and can it be logged to the samba log file somehow in the worst case. this would work if there is no way samba/cups can pass though the original name of the printjob. On a side note, i've got a pdf printer setup with samba/cups and have modified the pdf script that writes the pdf to dig out the %%Title from the postscript file and make that the ending .pdf file. but obviously i can't do that with the lpd because it's not a text script. Anyone got some brilliant ideas? thanks Matthew
>Hi All, >I've got a very nicely working samba server with cups as the >backend. i >also have a colour printer on which I must do billing every month. > >i've done a test page or two and the username comes though to >the colour >printer which is good. problem i had is the jobname in the logs is >smbprn_xxxxxxxx_xx (numbers) which is the samba job name. if >joe bloggs >complains and says he didn't print that many jobs, we've no >way of saying >here's what you printed with samba because it's not >recognizable to them. >sad.The jobs are logged through cups in <cupslogdir>/page_log. There are a few scripts around which generate some real numbers for print accounting, nothing is 100% reliable as once the job is sent (and therefore logged into page_log) cups assumes that it did print and doesn't allow for things like paper jams and subsequent reprints etc. One which I use is called printanalyzer, found at: http://amaru.ti6.tu-harburg.de/portal/Members/ti6ntm/Projekte/Printanalyzer If you setup cups to rotate logs every <n> billing days/months, then you should end up with some nice stats on how many jobs were printed to each printer (you may need to hack the script a bit to get it down to jobs per user per printer level).
The windows file name is passed in the %J variable to the samba server. I believe %J is the banner page contents. So, the share below does for me what you seem to want to do. It also makes the windows file name appear in the queue. The stuff with a=`echo etc. ` is to truncate the file name, since some windows apps send a long prefix before the file name. Now, if you are using CUPS, I just don't know. You can't specify printing commands for CUPS in the share, they say. Joel # Global parameters [global] [ps] comment = Filtered for Z53 path = /tmp read only = No create mask = 0700 guest ok = yes hosts allow = 192.168. printable = Yes printing = lprng print command = echo %J %p %s >> /tmp/junkJ;\ a="`echo '%J' | sed "s/^.*- //"`" ;\ echo This is truncated $a >> /tmp/junkJ;\ /usr/bin/lpr -Pps -J"$a" %s;\ rm %s lpq command = /usr/bin/lpq -Pps lprm command = /usr/bin/lprm -Pps %j lppause command = /usr/sbin/lpc hold ps %j lpresume command = /usr/sbin/lpc release ps %j share modes = No use client driver = yes On Thu, May 22, 2003 at 12:16:19PM +0930, mwestern@sola.com.au wrote:> Hi All, > I've got a very nicely working samba server with cups as the backend. i > also have a colour printer on which I must do billing every month. > > i've done a test page or two and the username comes though to the colour > printer which is good. problem i had is the jobname in the logs is > smbprn_xxxxxxxx_xx (numbers) which is the samba job name. if joe bloggs > complains and says he didn't print that many jobs, we've no way of saying > here's what you printed with samba because it's not recognizable to them. > sad. > > Does anybody know anything about how the jobname gets crunched etc and can > it be logged to the samba log file somehow in the worst case. this would > work if there is no way samba/cups can pass though the original name of the > printjob. > > On a side note, i've got a pdf printer setup with samba/cups and have > modified the pdf script that writes the pdf to dig out the %%Title from the > postscript file and make that the ending .pdf file. but obviously i can't > do that with the lpd because it's not a text script. > > Anyone got some brilliant ideas? > thanks > Matthew > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Seemingly Similar Threads
- print command: ? for decent print accounting (Was Printing. The REAL jobname. )
- Cups print jobnames became SMB jobname not doc name
- RE: How do I get the @#$$% job name to show instead of smbprn.yad a.yada?
- Jobnames displayed by lpq: Fixed a bit
- not enough charcters available in %J or confusing blanks?