But I think I know how
print command=ps2pdf %f ;rm %f
Now, a few difficulties:
1. I can't remember which variable refers to the incoming file but it's
documented in the samba man pages and in "using samba" which comes in HTML
with version 2.0.7
2. How are you going to get a filename for the output file from the client
user? The standard incoming filename is just the usual run of the mill
temporary filename automatically generated and I don't think the user will
be happy to end up with "rgyr74883.pdf" as an output file.
3. It appears that using a samba printer share is *not* the right tool for
the job. The idea of using a printer to generate postscript is nice, it
provides a general hook for *any* Windows application to create postscript
even it the app doesn't have a method to generate postscript. If you *only*
want to do this from an app that *can* generate postscript itself (eg. M$
Word with the postscript converter), the printer setup is superfluous and
just adds more complications to an already overloaded system (M$ Windows is
overloaded just on a clean install!! :-). You can simply save as postscript
to the directory specified below and it all happens for you.
The other option is to have a postscript to FILE printer set up, specify a
file share and have a sweeper script check that share for *.ps and do a
ps2pdf on anything it finds. With a bit of modification to the script, the
same location may be used for converting any format to another format (eg
pbm to gif or something) once you have the converter installed.
Something like this:
map //server/PDF-Convert to p: in DOS/Win
create a printer to FILE in Windows using a suitable postscript driver
Create the following script on the server and fire it up at boot time
# Postscript to PDF sweeper
# Author: Conor Daly <conor.daly at oceanfree.net>
# Date: 8th June 2000
# Converts any *.ps found in the specified directory to *.pdf and deletes
# Licensing: Use as per GPL
case in $#argv do #not quite sure of the syntax for "case in" "$#argv"
should give the number of arguments passed
case 3); # to the script including "$0" as the name of
do # not quite sure of the infinite loop thing
but "do... done" should do it.
for incoming in `ls *.ps` do
outgoing=`basename $incoming ps`pdf
ps2pdf $incoming $outgoing
rm -f $incoming
echo Useage: $0 <Delay in seconds> <Full path to Directory>
# end of Postscript to PDF Sweeper
Now, If you print to this printer and save your file as "P:\document.ps",
the sweeper will pick it up, convert to pdf and delete the .ps file. You
now end up with "P:\document.pdf" and you're happy. It's not elegant but it
should work. Thinks... Maybe it *is* elegant...
General Forecast Division
ph +353 1 8064255
fax +353 1 8064275
conor.daly at met.ie
From: Philip Trickett <phil at techworks.ie>
To: ilug at linux.ie <ilug at linux.ie>
Date: 08 June 2000 11:22
Subject: RE: Print to PDF? Was Re: [ILUG] Image Formats: the end
>On a related(ish) note, has anyone set up a 'printer' in linux using samba
>that windoze can print postscript to and the 'printer' will do a ps2pdf and
>dump the file in a directory somewhere?
>Just checking, as I wanted to do that sort of thing myself, and if someone
>has already done it.....
>>> -----Original Message-----
>> From: ilug-admin at linux.ie [mailto:ilug-admin at linux.ie]On Behalf Of Conor
>> Sent: 08 June 2000 11:13
>> To: ilug at linux.ie>> Subject: Print to PDF? Was Re: [ILUG] Image Formats: the end
>>>>>> Print to PDF???
>>>> Or, more to the point, anyone know of a tool to do sgml to pdf?
>> It's not in
>> the sgmltools package and I wanna write a HOWTO.
>> Conor Daly
>> General Forecast Division
>> Met Eireann
>> Glasnevin Hill
>> Dublin 9.
>>>> ph +353 1 8064255
>> fax +353 1 8064275
>>>>conor.daly at met.ie>>>> On Thu, Jun 08, 2000 at 12:32:25AM +0100, Liam Bedford wrote:
>> >I have to say, pdf would be a good option. If you could OCR the tiff, or
>> >print the word document to PDF. It's a lot smaller than the tiff as
>> >it's scalable. It is also guaranteed to work under most OS's,
>> even Linux if
>> >you don't encrypt it (I know that there's ways around it now)..
>> Irish Linux Users' Group: ilug at linux.ie>>http://www.linux.ie/mailman/listinfo/ilug for (un)subscription
>> List maintainer: listmaster at linux.ie>>>--
>Irish Linux Users' Group: ilug at linux.ie>http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
>List maintainer: listmaster at linux.ie>
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!