[Samba] Printing. The REAL jobname. :)
Joel Hammer
Joel at HammersHome.com
Tue Jun 3 10:36:00 GMT 2003
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 at 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
More information about the samba
mailing list