Hi, all. I'm trying to create a PDF queue... or, rather, I already have a homebrew solution I hacked together with an lprng filter, and it doesn't work too well. The solution at www.linuxgazette.com/issue72/bright.html, which uses the smb.conf and "print command" paramaters, appears to be much more elegant, but has one major shortfall: I don't see any way to get the filename of the file I'm printing. The jobname gives me: For websites: the URL (which is great) For apps (eg. Word): "Microsoft" (which is less great) Many of the documents my users will be printing have detailed part descriptions and partnumbers; it'd be a drag to not be able to have those automatically associated with the PDFs being generated. Does anyone see an elegant way to make this work? Or is it back to my inelegant, but functional, lprng solution? Thanks! Ken D'Ambrosio Sr. SysAdmin, Xanoptix, Inc.
Check your quoting. You could end up with the whole filename which I assume is what you want. Try putting single quotes around it wherever you are using it. ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | | Ryan Novosielski - Jr. UNIX Systems Admin |$&| |__| | | |__/ | \| _| | novosirj@umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent. | IST/ACS - NJMS Medical Science Bldg - C630 On Mon, 19 Jan 2004 kend@xanoptix.com wrote:> Hi, all. I'm trying to create a PDF queue... or, rather, I already have a > homebrew solution I hacked together with an lprng filter, and it doesn't > work too well. The solution at www.linuxgazette.com/issue72/bright.html, > which uses the smb.conf and "print command" paramaters, appears to be much > more elegant, but has one major shortfall: I don't see any way to get the > filename of the file I'm printing. The jobname gives me: > > For websites: the URL (which is great) > For apps (eg. Word): "Microsoft" (which is less great) > > Many of the documents my users will be printing have detailed part > descriptions and partnumbers; it'd be a drag to not be able to have those > automatically associated with the PDFs being generated. Does anyone see > an elegant way to make this work? Or is it back to my inelegant, but > functional, lprng solution? > > Thanks! > > Ken D'Ambrosio > Sr. SysAdmin, > Xanoptix, Inc. > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >
Ken D'Ambrosio wrote:> > The jobname gives me: > > For websites: the URL (which is great) > For apps (eg. Word): "Microsoft" (which is less great) >It's definitely in the way you qute the directive for Filename in your "print command" entry in smb.conf. I use this: -----start smb.conf snippet----- print command = /usr/local/bin/spr -P test_queue +no-banner +header "%J" %s ------end smb.conf snippet------ (The spr command is part of the Xi-Text print management software I use.) If you plan to use this for the names of the PDFs you generate, beware of the spaces and/or slashes that the "J%" string will contain, as well as the useless "Microsoft"'s that every Office print job will have. -wde -- Will Enestvedt UNIX System Administrator Johnson & Wales University -- Providence, RI