Hi there, I want to do the following: ------------------------------------------------------------ # smb.conf [global] ... printing = cups ... [pdfprinter] comment = PDF Drucker, druckt nach H:\print print command = /usr/bin/tps2file.sh "%s" "%U" "pdf" "pdfwrite" "" path = /tmp printable = yes valid users = @users ------------------------------------------------------------ The script "/usr/bin/tps2file.sh" convert the ps data to pdf. It works fine under SAMBA 2.2.3 but not under 3.0. How can I use my script under 3.0. Thanks for help. Regards Thomas Nolte -- Nolte Infosysteme, Neue Strasse 37, 38300 Wolfenbuettel tel 05331-946210, fax 05331-946211, www.nolteinfosysteme.de
> Hi there, > > I want to do the following: > > ------------------------------------------------------------ > # smb.conf > [global] > ... > printing = cups > ... > [pdfprinter] > comment = PDF Drucker, druckt nach H:\print > print command = /usr/bin/tps2file.sh "%s" "%U" "pdf" "pdfwrite" "" > path = /tmp > printable = yes > valid users = @users > ------------------------------------------------------------ > The script "/usr/bin/tps2file.sh" convert the ps data to pdf. It > works fine > under SAMBA 2.2.3 but not under 3.0. > > How can I use my script under 3.0. > > Thanks for help. > > Regards > Thomas NolteHi Thomas IIRC I had a script like this, but it had %u under 2.2. I assume that you have tried replacing the %U with % u or %S (does the %u work as a username do that the file can be emailed to the printee?) HTH Chris -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
On Thu, 29 Jan 2004 12:18:19 +0100 "Thomas Nolte" <t.nolte@nolteinfosysteme.de> wrote:> Hi there, > > I want to do the following: > > ------------------------------------------------------------ > # smb.conf > [global] > ... > printing = cups > ... > [pdfprinter] > comment = PDF Drucker, druckt nach H:\print > print command = /usr/bin/tps2file.sh "%s" "%U" "pdf" "pdfwrite" "" > path = /tmp > printable = yes > valid users = @users > ------------------------------------------------------------ > The script "/usr/bin/tps2file.sh" convert the ps data to pdf. It works > fine under SAMBA 2.2.3 but not under 3.0. > > How can I use my script under 3.0.If your samba is linked with the CUPS libraries it doesn't obey the "print command" definition. So i think you have to use: ================================ [global] ... printing = cups ... [pdfprinter] printing = bsd comment = PDF Drucker, druckt nach H:\print print command = /usr/bin/tps2file.sh "%s" "%U" "pdf" "pdfwrite" "" path = /tmp printable = yes valid users = @users ================================ (Not sure if it works to redefine the "printing" inside a subsection) regards, -- Stefan Klein, Systems Engineer MATERNA GmbH Information & Communications Theodor-Heuss-Str. 59, 61118 Bad Vilbel, Germany phone: +49 6101 806 0 | fax: +49 6101 806 590 mobile: +49 160 12 108 338 | Stefan.Klein@materna.de
daniel.jarboe@custserv.com
2004-Jan-29 20:59 UTC
[Samba] Print via print command while using 3.0
> > > # smb.conf > > > [global] > > > ... > > > printing = cups > > > ... > > > [pdfprinter] > > > comment = PDF Drucker, druckt nach H:\print > > > print command = /usr/bin/tps2file.sh "%s" "%U" "pdf" > "pdfwrite" > "" > > > path = /tmp > > > printable = yes > > > valid users = @usersYup, it's a bummer that you can't presently have the advantages of integrated cups calls while also being able to use the print command on a per-share as-needed basis. There are a few options though. You should probably read this thread first: http://marc.theaimsgroup.com/?l=samba&m=104893379814030&w=2 Your quickest best-bets are probably: 1 - use cups backend for writing pdf's 2 - change your printing type to something other than cups and specify global lppause/lpq/lpresume/lprm/print/queuepause/queueresume commands appropriate for cups, and override them to call your script on that share. You'll lose cups integration in this case though, which you'd probably like to avoid if possible 3 - Have a socket listener wrap around your tps2file.sh script, create a cups printer with this socket as the destination. You might even be able to use (x)inetd... dunno. ~ Daniel ----------------------------------------------------------------------- This message is the property of Time Inc. or its affiliates. It may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message. Thank you.
> [Samba] Print via print command while using 3.0 > Stefan Klein stefan.klein at materna.de > Thu Jan 29 12:27:58 GMT 2004[....]> So i think you have to use: > ================================> [global] > ... > printing = cups > ... > [pdfprinter] > printing = bsd > comment = PDF Drucker, druckt nach H:\print > print command = /usr/bin/tps2file.sh "%s" "%U" "pdf" "pdfwrite" "" > path = /tmp > printable = yes > valid users = @users > ================================> > (Not sure if it works to redefine the "printing" inside a subsection) >It used to, but now it doesn't any more. I think we should ask our Samba Team coding gurus to change "printing = ..." to become a service level instead of a global parameter. This way it would be much easier to achieve what people want to achieve here. The only way to do it now, is to set "printing = sysv" or "printing = bsd" as the global setting, which in turn looses you all the convenient functions of CUPS library integration into Samba. Of course, one could waive your custom "print command" altogether and go down the "use the CUPS pdf:/-backend" way of PDF generation, as is described here (and in related thread) in much detail: http://lists.samba.org/archive/samba/2003-March/064650.html http://lists.samba.org/archive/samba/2003-April/064653.html> regards, > -- > Stefan Klein, Systems EngineerCheers, Kurt