File name in the print command
mike at pelley.com
Fri Nov 27 15:31:28 GMT 1998
> 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
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.
More information about the samba