Since everyone now starts asking me privately how I set up that PDF Printer, I suppose I'd better post that here instead of privately replying to everyone interested ;-) Unfortunately, I don't have the exact script anymore. However, the procedure is fairly simple: All you need is Samba (obviously), GNU Ghostscript and a way to get the resulting PDF file to the user; I used the 'mime-construct' Perl program for that purpose, but there are other ways too, of course. The required ghostscript call is as follows: gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps You can write a script that takes the path&filename of input.ps and the username as its input (see the '%s' and '%u' Samba substitutions to get these) and that gets the result to the user in some way. As said, I used mime-construct to send the PDF as a MIME-attachement to the user, but this has its drawbacks in that your mailserver administrator may not like someone printing a 30Meg .pdf; you may want to look into putting this in the users' homedirectory or something likewise. Then, everything else you need to do is to set up a printer share with the parameter 'print command' set to the name of your script, and install a PostScript printer driver on the users' computer to print to your PDF service (Any postscript printer should do; I used an Apple Laserwriter which worked flawlessly). Still, I'd like to know whether someone knows a way to achieve something similar for a disk share ;-) Regards, Wouter
If you want to set up a pdf printer with samba, you can also read this article: http://www.linuxgazette.com/issue72/bright.html Wouter Verhelst wrote:> Since everyone now starts asking me privately how I set up that PDF > Printer, I suppose I'd better post that here instead of privately > replying to everyone interested ;-) > > Unfortunately, I don't have the exact script anymore. However, the > procedure is fairly simple: All you need is Samba (obviously), GNU > Ghostscript and a way to get the resulting PDF file to the user; I used > the 'mime-construct' Perl program for that purpose, but there are other > ways too, of course. > > The required ghostscript call is as follows: > > gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps > > You can write a script that takes the path&filename of input.ps and the > username as its input (see the '%s' and '%u' Samba substitutions to get > these) and that gets the result to the user in some way. As said, I used > mime-construct to send the PDF as a MIME-attachement to the user, but > this has its drawbacks in that your mailserver administrator may not > like someone printing a 30Meg .pdf; you may want to look into putting > this in the users' homedirectory or something likewise. > > Then, everything else you need to do is to set up a printer share with > the parameter 'print command' set to the name of your script, and > install a PostScript printer driver on the users' computer to print to > your PDF service (Any postscript printer should do; I used an Apple > Laserwriter which worked flawlessly). > > Still, I'd like to know whether someone knows a way to achieve something > similar for a disk share ;-) > > Regards, > > Wouter > >
I took a slightly different approach to Wouter... 1. I created a TOPDF share on the server. 2. I created a little script see end. 3. I inserted the script into the crontab, so it would check every minute to see if there were any new files to create as pdfs. 4. I used the Adobe Postscript Driver rather than the Apple Laserwriter, as I wanted colour, and wasn't sure of the Color Laserwriter's authenticity of postscript. The user prints to "Generic Postscript Printer", which is set up as "Print to File", when asked for a filename, specifies the TOPDF share and a filename. The crontab runs the script and creates a file with the filename of the original with the extension PDF. Why : because I would prefer to let the user choose the name of the PDF as there is less chance of overwriting. The email option also causes problems if you use the same filename and Eudora, as Eudora doesn't handle multiple files with the same name very gracefully (I am NOT starting a flamewar on email clients!) Other bits : I tried to use a magic script to do the processing, but as the clients needed to create files in the ToPDF directory, the magic script got erased. Grrr. Ideally there would be a generic plugin to execute a script every time a file is created or modified on the share, but this would (as I understand) be a VFS object and I myself would like to see it implementable on a filesystem basis, rather than a samba basis. Anyone volunteering - I thought not. So, there is an unavoidable delay with my system, but it works and gives more control to the user, so without any more delay, here's the script (remember to put it in crontab every minute - it checks if it has already processed the files before processing them again so it shouldn't be too processor intensive.) #!/bin/bash # script to process ps files and create pdfs # written by martyn ranyard and donated under the GPL, available from www.gnu.org for fname in `ls /mnt/raid/topdf/* | grep -iv "\.pdf" `; do #list all files that don't contain .pdf if [ ! -f `echo $fname | sed -e 's/\..*/\.pdf/' ` ]; then #if a pdf doesn't already exist... /usr/bin/ps2pdf $fname `echo $fname | sed -e 's/\..*/\.pdf/' ` #create one. chmod 777 `echo $fname | sed -e 's/\..*/\.pdf/' ` > /dev/null 2> /dev/null #let anybody access them fi done #END of script As I recall, the main line in the ps2pdf script is : exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile $OPTIONS -c save pop -f $infile so very similar to Wouter's command, but ps2pdf comes with most ghostscript distributions. Martyn At 11:23 AM 3/26/02 +0100, Dirk Allaert wrote:>If you want to set up a pdf printer with samba, you can also read this >article: >http://www.linuxgazette.com/issue72/bright.html > >Wouter Verhelst wrote: >>Since everyone now starts asking me privately how I set up that PDF >>Printer, I suppose I'd better post that here instead of privately >>replying to everyone interested ;-) >>Unfortunately, I don't have the exact script anymore. However, the >>procedure is fairly simple: All you need is Samba (obviously), GNU >>Ghostscript and a way to get the resulting PDF file to the user; I used >>the 'mime-construct' Perl program for that purpose, but there are other >>ways too, of course. >>The required ghostscript call is as follows: >>gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps >>You can write a script that takes the path&filename of input.ps and the >>username as its input (see the '%s' and '%u' Samba substitutions to get >>these) and that gets the result to the user in some way. As said, I used >>mime-construct to send the PDF as a MIME-attachement to the user, but >>this has its drawbacks in that your mailserver administrator may not like >>someone printing a 30Meg .pdf; you may want to look into putting this in >>the users' homedirectory or something likewise. >>Then, everything else you need to do is to set up a printer share with >>the parameter 'print command' set to the name of your script, and install >>a PostScript printer driver on the users' computer to print to your PDF >>service (Any postscript printer should do; I used an Apple Laserwriter >>which worked flawlessly). >>Still, I'd like to know whether someone knows a way to achieve something >>similar for a disk share ;-) >>Regards, >>Wouter > > > >-- >To unsubscribe from this list go to the following URL and read the >instructions: http://lists.samba.org/mailman/listinfo/samba-------------- Martyn Ranyard I am not a member of the samba team, and anything that I say may not be as accurate as a response from one of the team. I reply to save those more qualified time, which can more usefully be spent developing SAMBA further.
Martyn, I tried running a server-level pdf printer and ran into some of the same issues you have dealt with. Ultimately I decided to stick with a client-side implementation by installing Ghostscript and RedMon (http://www.cs.wisc.edu/~ghost/redmon/) on the client system. Has been working great for me since. AE -----Original Message----- From: Martyn Ranyard [mailto:ranyardm@lineone.net] Sent: Tuesday, March 26, 2002 5:49 AM To: Dirk Allaert Cc: 'samba@lists.samba.org' Subject: Re: [Samba] PDF Print command I took a slightly different approach to Wouter... 1. I created a TOPDF share on the server. 2. I created a little script see end. 3. I inserted the script into the crontab, so it would check every minute to see if there were any new files to create as pdfs. 4. I used the Adobe Postscript Driver rather than the Apple Laserwriter, as I wanted colour, and wasn't sure of the Color Laserwriter's authenticity of postscript. The user prints to "Generic Postscript Printer", which is set up as "Print to File", when asked for a filename, specifies the TOPDF share and a filename. The crontab runs the script and creates a file with the filename of the original with the extension PDF. Why : because I would prefer to let the user choose the name of the PDF as there is less chance of overwriting. The email option also causes problems if you use the same filename and Eudora, as Eudora doesn't handle multiple files with the same name very gracefully (I am NOT starting a flamewar on email clients!) Other bits : I tried to use a magic script to do the processing, but as the clients needed to create files in the ToPDF directory, the magic script got erased. Grrr. Ideally there would be a generic plugin to execute a script every time a file is created or modified on the share, but this would (as I understand) be a VFS object and I myself would like to see it implementable on a filesystem basis, rather than a samba basis. Anyone volunteering - I thought not. So, there is an unavoidable delay with my system, but it works and gives more control to the user, so without any more delay, here's the script (remember to put it in crontab every minute - it checks if it has already processed the files before processing them again so it shouldn't be too processor intensive.) #!/bin/bash # script to process ps files and create pdfs # written by martyn ranyard and donated under the GPL, available from www.gnu.org for fname in `ls /mnt/raid/topdf/* | grep -iv "\.pdf" `; do #list all files that don't contain .pdf if [ ! -f `echo $fname | sed -e 's/\..*/\.pdf/' ` ]; then #if a pdf doesn't already exist... /usr/bin/ps2pdf $fname `echo $fname | sed -e 's/\..*/\.pdf/' ` #create one. chmod 777 `echo $fname | sed -e 's/\..*/\.pdf/' ` > /dev/null 2> /dev/null #let anybody access them fi done #END of script As I recall, the main line in the ps2pdf script is : exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$outfile $OPTIONS -c save pop -f $infile so very similar to Wouter's command, but ps2pdf comes with most ghostscript distributions. Martyn At 11:23 AM 3/26/02 +0100, Dirk Allaert wrote:>If you want to set up a pdf printer with samba, you can also read this >article: >http://www.linuxgazette.com/issue72/bright.html > >Wouter Verhelst wrote: >>Since everyone now starts asking me privately how I set up that PDF >>Printer, I suppose I'd better post that here instead of privately >>replying to everyone interested ;-) >>Unfortunately, I don't have the exact script anymore. However, the >>procedure is fairly simple: All you need is Samba (obviously), GNU >>Ghostscript and a way to get the resulting PDF file to the user; I used >>the 'mime-construct' Perl program for that purpose, but there are other >>ways too, of course. >>The required ghostscript call is as follows: >>gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps >>You can write a script that takes the path&filename of input.ps and the >>username as its input (see the '%s' and '%u' Samba substitutions to get >>these) and that gets the result to the user in some way. As said, I used >>mime-construct to send the PDF as a MIME-attachement to the user, but >>this has its drawbacks in that your mailserver administrator may not like >>someone printing a 30Meg .pdf; you may want to look into putting this in >>the users' homedirectory or something likewise. >>Then, everything else you need to do is to set up a printer share with >>the parameter 'print command' set to the name of your script, and install >>a PostScript printer driver on the users' computer to print to your PDF >>service (Any postscript printer should do; I used an Apple Laserwriter >>which worked flawlessly). >>Still, I'd like to know whether someone knows a way to achieve something >>similar for a disk share ;-) >>Regards, >>Wouter > > > >-- >To unsubscribe from this list go to the following URL and read the >instructions: http://lists.samba.org/mailman/listinfo/samba-------------- Martyn Ranyard I am not a member of the samba team, and anything that I say may not be as accurate as a response from one of the team. I reply to save those more qualified time, which can more usefully be spent developing SAMBA further. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
For those of us who like to simplity our lives and find all those switches to gs confusing, the ps2pdf script that comes with Ghostscript works rather well.... As for a disk share, just create a script (I would use perl, but that's only cause I'm not as familiar with shell scripting), that scans a given directory for any ps files, runs the ps2pdf script, saves the ouput pdf in a designated folder, and use cron to run that every minute.. (Of course, the better way would be to program your script as a deamon that runs itself continuously with a small pause between executions.) (Don't forget to remove or rename the source ps file). On Tue, 26 Mar 2002, Wouter Verhelst wrote: Since everyone now starts asking me privately how I set up that PDF Printer, I suppose I'd better post that here instead of privately replying to everyone interested ;-) Unfortunately, I don't have the exact script anymore. However, the procedure is fairly simple: All you need is Samba (obviously), GNU Ghostscript and a way to get the resulting PDF file to the user; I used the 'mime-construct' Perl program for that purpose, but there are other ways too, of course. The required ghostscript call is as follows: gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps You can write a script that takes the path&filename of input.ps and the username as its input (see the '%s' and '%u' Samba substitutions to get these) and that gets the result to the user in some way. As said, I used mime-construct to send the PDF as a MIME-attachement to the user, but this has its drawbacks in that your mailserver administrator may not like someone printing a 30Meg .pdf; you may want to look into putting this in the users' homedirectory or something likewise. Then, everything else you need to do is to set up a printer share with the parameter 'print command' set to the name of your script, and install a PostScript printer driver on the users' computer to print to your PDF service (Any postscript printer should do; I used an Apple Laserwriter which worked flawlessly). Still, I'd like to know whether someone knows a way to achieve something similar for a disk share ;-) Regards, Wouter
I did a similar thing. I created a printer on the Samba system and wrote a Perl print filter script to generate a PDF file using the Ghostscript 'ps2pdf' program. (I use a Postscript printer driver on the Windows side, which is set up to auto-install when someone connects to the PDF printer.) Output is dumped in a disk share where the users know to look for it, and a WinPopUp message is sent when the file is complete. The only rough edge is that there's no way for a print filter to know the actual filename of the printed document, since Samba doesn't pass it along. The output filename is generated from the user's username, the current time, and the process ID -- the first two make it easier for the user to find the right file, the last ensures that no matter how many print jobs they queue up none are likely to be overwritten.
Unfortunately that's no good on NT 4.0 -- the file gets written with the same privilages as the print driver, which means local Administrator. Unless I gave admin privilages to every user they'd be unable to manipulate the resulting files. If you're not running NT, or don't mind your users having administrator privilages, it works great, though. Incidentally, fair warning -- it seems to be impossible to completely uninstall RedMon once you've installed it. At least, it was on my system. -----Original Message----- From: Adam Ellis [mailto:AdamE@AccelGrp.com] Sent: Tuesday, March 26, 2002 8:22 AM To: 'Martyn Ranyard'; Dirk Allaert Cc: 'samba@lists.samba.org' Subject: RE: [Samba] PDF Print command Martyn, I tried running a server-level pdf printer and ran into some of the same issues you have dealt with. Ultimately I decided to stick with a client-side implementation by installing Ghostscript and RedMon (http://www.cs.wisc.edu/~ghost/redmon/) on the client system. Has been working great for me since. AE
Hmm...that might work. Didn't think to try it. -----Original Message----- From: Martyn Ranyard [mailto:ranyardm@lineone.net] Sent: Tuesday, March 26, 2002 9:16 AM To: David Brodbeck Cc: 'samba@lists.samba.org' Subject: RE: [Samba] PDF Print command At 09:32 AM 3/26/02 -0500, David Brodbeck wrote:>Unfortunately that's no good on NT 4.0 -- the file gets written with the >same privilages as the print driver, which means local Administrator. >Unless I gave admin privilages to every user they'd be unable to manipulate >the resulting files. If you're not running NT, or don't mind your users >having administrator privilages, it works great, though.In that case, surely you just implement a guideline that the users must print to file onto a samba share and do a force user / group / mask on that share? /me does lateral>Incidentally, fair warning -- it seems to be impossible to completely >uninstall RedMon once you've installed it. At least, it was on my system.-------------- Martyn Ranyard I am not a member of the samba team, and anything that I say may not be as accurate as a response from one of the team. I reply to save those more qualified time, which can more usefully be spent developing SAMBA further.
One thing that always worries me about cron-job solutions is, how do you know when the file is done being written? I suppose the odds of the script running exactly when someone's halfway through a file are low, but you can't always count on it. What if someone wants to convert a 20-megabyte file? (Don't laugh; we've produced 1000-page manuals in PDF, resulting in 100-megabyte-plus PDF files, though so far not with the script I've written. We already had a single license for Adobe Distiller for doing those. My script was mainly to avoid having to buy a copy for everyone who needed to do occasional small PDFs.)
I went through all the steps, and the print jobs just tend to disappear. I've looked through all the logs and nothing tells me where it's falling down. I installed the drivers, added all the items to smb.conf and it looks perfect from the client side. -----Original Message----- From: Dirk Allaert [mailto:da@schaubroeck.be] Sent: Tuesday, March 26, 2002 5:24 AM To: 'samba@lists.samba.org' Subject: Re: [Samba] PDF Print command If you want to set up a pdf printer with samba, you can also read this article: http://www.linuxgazette.com/issue72/bright.html Wouter Verhelst wrote:> Since everyone now starts asking me privately how I set up that PDF > Printer, I suppose I'd better post that here instead of privately > replying to everyone interested ;-) > > Unfortunately, I don't have the exact script anymore. However, the > procedure is fairly simple: All you need is Samba (obviously), GNU > Ghostscript and a way to get the resulting PDF file to the user; Iused> the 'mime-construct' Perl program for that purpose, but there areother> ways too, of course. > > The required ghostscript call is as follows: > > gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf > input.ps > > You can write a script that takes the path&filename of input.ps and > the > username as its input (see the '%s' and '%u' Samba substitutions toget> these) and that gets the result to the user in some way. As said, Iused> mime-construct to send the PDF as a MIME-attachement to the user, but > this has its drawbacks in that your mailserver administrator may not > like someone printing a 30Meg .pdf; you may want to look into putting > this in the users' homedirectory or something likewise. > > Then, everything else you need to do is to set up a printer share with > the parameter 'print command' set to the name of your script, and > install a PostScript printer driver on the users' computer to print to> your PDF service (Any postscript printer should do; I used an Apple > Laserwriter which worked flawlessly). > > Still, I'd like to know whether someone knows a way to achieve > something > similar for a disk share ;-) > > Regards, > > Wouter > >-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Hi I cant quite work out whats going on in this thread but I had the same problem with the linuxgazette article until I removed the print job at the end. See my printer share following. What the article didnt mention that if you use a colour printer driver then you get colour pdf files. [Acrobat] comment = Print a PDF Document path = /usr/local/samba/lib/spool print command = /usr/bin/printpdf %s; rm %s ps you dont need to add this sudo printer to your printcap. Windows HP 8000 colour postscript drivers HTH Message: 15 Subject: RE: [Samba] PDF Print command Date: Tue, 26 Mar 2002 10:46:42 -0500 From: "Blanchard, Michael" <MBlanchard@grandaire.com> To: "Dirk Allaert" <da@schaubroeck.be>, <samba@lists.samba.org> I went through all the steps, and the print jobs just tend to disappear. I've looked through all the logs and nothing tells me where it's falling down. I installed the drivers, added all the items to smb.conf and it looks perfect from the client side. -----Original Message----- From: Dirk Allaert [mailto:da@schaubroeck.be]=20 Sent: Tuesday, March 26, 2002 5:24 AM To: 'samba@lists.samba.org' Subject: Re: [Samba] PDF Print command If you want to set up a pdf printer with samba, you can also read this=20 article: http://www.linuxgazette.com/issue72/bright.html
Try This The fist call from ps2pdf is the file in the spool dir. you may not have the right permisions. Have you set the spool dir for the printer and do you have the correct permission try setting the spool dir to 777 (then test) eg [shr] comment = World Writable path = /shr read only = No guest ok = yes create mask = 0777 [Acrobat] comment = Print a PDF Document path = /usr/local/samba/lib/spool ** spool dir set to 777** guest ok = Yes printable = Yes print command = /usr/bin/printpdf %s; rm %s On Tuesday 26 Mar 2002 7:26 pm, you wrote:> It's still not working, and ps2pdf outputs: > **** Unable to open the initial device, quitting. > > > -----Original Message----- > From: David Mulcahy [mailto:david.mulcahy@eseol.co.uk] > Sent: Tuesday, March 26, 2002 2:00 PM > To: Blanchard, Michael > Cc: samba@lists.samba.org > Subject: RE: [Samba] PDF Print command > > > Hi > > I cant quite work out whats going on in this thread but I had the same > problem with the linuxgazette article until I removed the print job at > the > end. See my printer share following. What the article didnt mention > that if > you use a colour printer driver then you get colour pdf files. > > [Acrobat] > comment = Print a PDF Document > path = /usr/local/samba/lib/spool > print command = /usr/bin/printpdf %s; rm %s > > ps you dont need to add this sudo printer to your printcap. Windows HP > 8000 colour postscript drivers > > HTH > > Message: 15 > Subject: RE: [Samba] PDF Print command > Date: Tue, 26 Mar 2002 10:46:42 -0500 > From: "Blanchard, Michael" <MBlanchard@grandaire.com> > To: "Dirk Allaert" <da@schaubroeck.be>, <samba@lists.samba.org> > > I went through all the steps, and the print jobs just tend to disappear. > I've looked through all the logs and nothing tells me where it's falling > down. I installed the drivers, added all the items to smb.conf and it > looks perfect from the client side. > > -----Original Message----- > From: Dirk Allaert [mailto:da@schaubroeck.be]=20 > Sent: Tuesday, March 26, 2002 5:24 AM > To: 'samba@lists.samba.org' > Subject: Re: [Samba] PDF Print command > > > If you want to set up a pdf printer with samba, you can also read > this=20 > article: > http://www.linuxgazette.com/issue72/bright.html
If you use something like: ps2pdf $1 $OUTDIR/$DATE.temp mv $OUTDIR/$DATE.temp $OUTDIR/$DATE.pdf you have to watch out for permissions, the user who prints has to be able to write to $OUTDIR. you probably should add some debug statements to the script. maybe something like: ps2pdf $1 $OUTDIR/$DATE.temp 2>>/tmp/mylog >>/tmp/mylog mv $OUTDIR/$DATE.temp $OUTDIR/$DATE.pdf 2>>/tmp/mylog >>/tmp/mylog -----Oorspronkelijk bericht----- Van: Blanchard, Michael Verzonden: di 26/03/2002 16:46 Aan: Dirk ALLAERT; samba@lists.samba.org CC: Onderwerp: RE: [Samba] PDF Print command I went through all the steps, and the print jobs just tend to disappear. I've looked through all the logs and nothing tells me where it's falling down. I installed the drivers, added all the items to smb.conf and it looks perfect from the client side. -----Original Message----- From: Dirk Allaert [mailto:da@schaubroeck.be] Sent: Tuesday, March 26, 2002 5:24 AM To: 'samba@lists.samba.org' Subject: Re: [Samba] PDF Print command If you want to set up a pdf printer with samba, you can also read this article: http://www.linuxgazette.com/issue72/bright.html Wouter Verhelst wrote: > Since everyone now starts asking me privately how I set up that PDF > Printer, I suppose I'd better post that here instead of privately > replying to everyone interested ;-) > > Unfortunately, I don't have the exact script anymore. However, the > procedure is fairly simple: All you need is Samba (obviously), GNU > Ghostscript and a way to get the resulting PDF file to the user; I used > the 'mime-construct' Perl program for that purpose, but there are other > ways too, of course. > > The required ghostscript call is as follows: > > gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf > input.ps > > You can write a script that takes the path&filename of input.ps and > the > username as its input (see the '%s' and '%u' Samba substitutions to get > these) and that gets the result to the user in some way. As said, I used > mime-construct to send the PDF as a MIME-attachement to the user, but > this has its drawbacks in that your mailserver administrator may not > like someone printing a 30Meg .pdf; you may want to look into putting > this in the users' homedirectory or something likewise. > > Then, everything else you need to do is to set up a printer share with > the parameter 'print command' set to the name of your script, and > install a PostScript printer driver on the users' computer to print to > your PDF service (Any postscript printer should do; I used an Apple > Laserwriter which worked flawlessly). > > Still, I'd like to know whether someone knows a way to achieve > something > similar for a disk share ;-) > > Regards, > > Wouter > > -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 6626 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20020327/d2c9dbab/attachment.bin
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, it seems everyone has posted their own setups for this, but this is the one that I find works the best for us (although it may be a bit of a long script to keep in the smb.conf, but that way it's impossible to lose it!: [pdfprint] ~ path = /var/tmp ~ guest ok = No ~ printable = Yes ~ comment = PDF Generator ~ print command = ps2pdf13 -dAutoFilterColorImages=false \ ~ -sColorImageFilter=FlateEncode %s ~%u/newpdf.pdf &&\ ~ mv -f %s ~%u/newps.ps && \ ~ echo "Please find your PDF and PS files at Z:\\newpdf.pdf \and Z:\\newps.ps, and copy them somewhere else \ before you print more." \ ~ |smbclient -M %m -I %I -U printserver && \ ~ chmod 600 ~%u/newpdf.p* Usually people don't try and shunt multiple jobs through at one, and they are notified by popup where the pdf. We also keep the postscript, since some people need postscript also (no reason to have another share just for ps). And we rely on windows supplying a name for the printed file. Of course, you should upload a decent PS colour printer driver so it works via point-and-print. We had one for a HP Designjet (NT drivers) which I have lost. It was capable of doing PS up to A0, anyone know what PS colour printers (with win2k drivers available) can print A0? Also, is there any way to set a virtual printer like this not to spool (on all the windows clients)? | Message: 16 | From: David Mulcahy <david.mulcahy@eseol.co.uk> | To: "Blanchard, Michael" <MBlanchard@grandaire.com> | Date: Tue, 26 Mar 2002 20:07:06 +0000 | Cc: samba@lists.samba.org | Subject: [Samba] Re: PDF Print command | | Try This | The fist call from ps2pdf is the file in the spool dir. you may not have the | right permisions. Have you set the spool dir for the printer and do you have | the correct permission try setting the spool dir to 777 (then test) | | eg | | [shr] | comment = World Writable | path = /shr | read only = No | guest ok = yes | create mask = 0777 | | [Acrobat] | comment = Print a PDF Document | path = /usr/local/samba/lib/spool ** spool dir set to 777** | guest ok = Yes | printable = Yes | print command = /usr/bin/printpdf %s; rm %s - -- |----------------Registered Linux User #182071-----------------| Buchan Milne Mechanical Engineer, Network Manager Cellphone * Work +27 82 472 2231 * +27 21 8828820x202 Stellenbosch Automotive Engineering http://www.cae.co.za GPG Key http://ranger.dnsalias.com/gpg.key -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE8ofSsrJK6UGDSBKcRArBCAJ9mIDMmNeZVtoT02PHGeUWKdaLGqQCePpVl I62D96UwPaZmqTp1BM1zkgo=dt8F -----END PGP SIGNATURE-----