bill, a quick glance at google yielded some helpful replies:
http://groups.google.com/groups?as_q=read%20from%20stdin&as_ugroup=comp.text.tex
why this is a problem (btw, robin is one of the world's experts on latex):
http://groups.google.com/groups?q=read+from+stdin+group:comp.text.tex&safe=off&rnum=1&selm=4jqbd1%24k18%40d2.tufts.edu
this might be helpful:
http://groups.google.com/groups?q=read+from+stdin+group:comp.text.tex&safe=off&rnum=2&selm=xn9wviksp0z.fsf%40pixel13.doc.ic.ac.uk
david is one of the world experts on latex, vim and procmail:
http://groups.google.com/groups?q=read+from+stdin+group:comp.text.tex&safe=off&rnum=4&selm=m2emacmclx.fsf%40mailhost.neuroinformatik.ruhr-uni-bochum.de
from the quick reading i did, you'll need to find an alternative to dvips.
but perhaps perl/expect or tcl/expect might be useful here?
peter
begin: William Kendrick <[EMAIL PROTECTED]> quote
> I'm generating a PDF based on a Latex document.
> The Latex is actually a template being processed by Perl, and
> I want the PDF to be output from a CGI (as an "application/pdf" mime-type).
>
> My problem is I can't simply do this:
>
> ./parser.pl | latex | dvipdf
>
> Because "latex" doesn't read from STDIN or write to STDOUT.
> Neither does "dvipdf".
>
> So what I'm doing for the time being is this:
>
> ./parser.pl | ./tex2pdf.sh
>
> Where "tex2pdf.sh" is a shell script which reads from STDIN and generates
> a temporary file:
>
> cat > out.tex
>
>
> It then runs "latex" on that file:
>
> latex out.tex 2> /dev/null # Don't output "I'm TeX version BLAH"! >:^(
>
>
> Then it runs "dvipdf" on _that_ file:
>
> dvipdf out.dvi
>
>
> And finally, spits the resulting PDF to STDOUT:
>
> cat out.pdf
>
>
>
> This requires that I have a number of temporary files ready to
> be written to by these (via the CGI's system or pipe call to
> "./parser.pl | ./tex2pdf.sh"):
>
> Of course, I need:
>
> out.tex - to capture the parsed TeX template
> out.dvi - what "latex" makes when you run it on "out.tex"
> out.pdf - the end result, which "dvipdf" makes based on "out.dvi"
>
> _AND_, I need these:
>
> out.aux
> out.log
>
>
> Two files which "latex" and/or "dvipdf" make for heaven-knows-what reason.
>
>
>
> Is there a simpler way? This whole temp. file this is complete crap, and
> will NOT be suitable for production! (The files will get clobbered by
> multiple simultaneous calls to the CGI, unless I do some kind of stupid
> file locking, in which case the speed of the system will drop dramatically)
>
>
> HELP!
>
> -bill!
--
"The following addresses had permanent fatal errors..." [EMAIL PROTECTED]
-- Mailer Daemon www.dirac.org/p