[Samba] PDF Print command

Gareth Blades gareth.blades at webscreen-technology.com
Tue Mar 26 08:09:03 GMT 2002


I use :-
ps2pdf13 -dAutoFilterColorImages=false -sColorImageFilter=FlateEncode

This creates Acrobat V4 compatible PDF's with all graphics compressed using
ZIP instead of JPEG.
I find this makes the graphics look much better and strangely in almost all
cases leads to a smaller file size aswell!

> -----Original Message-----
> From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]On
> Behalf Of Rashkae
> Sent: Tuesday, March 26, 2002 02:10
> To: Wouter Verhelst
> Cc: 'samba at lists.samba.org'
> Subject: Re: [Samba] PDF Print command
>
>
> 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
>
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
>
>






More information about the samba mailing list