Hi,
I just want to ask you if someone have had this problem,
if this is a bug, a "feature" or the expected behavior.
We use Samba 1.9.18p10 on slackware linux as a print server.
This print server is dedicated to students so we print a
banner with every print job in order to be able to distinguish
the beginning and ending of a students job.
The problem appears when we try to print the first filename
of the job in the banner: we don't have access to this
information in the print command. The %s and %f macros give
us the spool file name (not the "real" filename).
When we print from a Windows 95 the spool file name is
formet as /printer_path/<client_name>.<ramdom_number>, but
when we print using smbclient the spool file is
/printer_path/<real_filename>.<random_number>.
My question is:
- Is there any way to know the original name when we print
from Win95?
- Who choose this name? The samba server or the client?
Please, if there is anybody who is printing banners and this
works for him, tell me which configuration is using
(Samba version, system, relevant smb.conf parameters, ...)
It would be great to have another macro with the filename
the client knows.
--
Miquel Bonastre (miquel@fib.upc.es)
Area de Sistemes Unix (LCFIB)
Facultat d'Informatica de Barcelona
Universitat Politecnica de Catalunya
> The problem appears when we try to print the first filename > of the job in the banner: we don't have access to this > information in the print command. The %s and %f macros give > us the spool file name (not the "real" filename)....> - Is there any way to know the original name when we print > from Win95? > - Who choose this name? The samba server or the client?So far as I understand, the Windows machine doesn't send the name of the file to the printer queue on your unix machine, so it is impossible for Samba to know the original name of the file. The Samba server chooses the name of the spool file based on the client name and some number (perhaps process id?). Not much good news there, but there is a trick I picked up for our site here. Our printer is a postscript printer, so when our windows machines send print jobs to the unix server, they naturally render the documents to postscript. A line or two from the top of the postscript file most windows programs will include the original name of the document - something like '%%Title: Microsoft Word - Timesheet.doc'. I've written a Perl script which replaces lpq (for Samba only) that extracts this title and uses it in the print queue visible to Windows machines - I'm pretty sure you could do the same for a banner page. CU! Mike.