[Samba] PDF Print command
Dirk ALLAERT
Dirk.Allaert at schaubroeck.be
Wed Mar 27 02:06:25 GMT 2002
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 at 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 at schaubroeck.be]
Sent: Tuesday, March 26, 2002 5:24 AM
To: 'samba at 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
More information about the samba
mailing list