On Fri, Apr 27, 2001 at 10:42:08AM +0100 or so it is rumoured hereabouts,
Liam Bedford thought:
> At 18:33 26/04/2001 +0000, Conor Daly wrote:
> >On Thu, Apr 26, 2001 at 04:52:36PM +0100 or thereabouts, Declan Grady wrote:
> > > Is there anyhting available which can run like a print server, but create
> > > PDF files, instead of producing printed output ?
> > >
> > > Thinking of an smb print server, for windows clients, with one HP printer,
> > > and one PDF-Writer -like printer.
> > >
> > > Whats the catch ?
> >Yeah, did that. May still have scripts lying around. They'll be in the
> >ILUG archive though.
> >loop: #Does this work in bash?
> >for i in `*.ps`; do
> >ps2pdf $i > `basename $i ps`pdf
>>> hmmm.. will this ps2pdf program take stdin?
Nope. In fact, it generates the output file itself so the output redirect
isn't needed. The script should just read
If you want to use it in a pipe, you'll need to generate a tmp file from
stdin and then ps2pdf the tmp file.
pipe or console?
if [ -t 0 ]; then
# We're in a console here
# Here, we're in a pipe
# We need a temporary file here so something else can carry on
cat > /tmp/input-file$$.ps
mv /tmp/input-file$$.pdf suitable/location/and/filename.pdf
>> and in /var/spool/lpd/pdf/filter have:
> TMPFILE=`mktemp /tmp/output.XXXXXX`
> ps2pdf - > $TMPFILE
> cp $TMPFILE wherever (and rename it to whatever)
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
10:57am up 12 days, 21:11, 0 users, load average: 0.00, 0.00, 0.00
10:56am up 59 days, 20:33, 2 users, load average: 0.12, 0.03, 0.01
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!