On Wed, Aug 22, 2001 at 11:22:55AM -0700, William Kendrick wrote:
> 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".
I *strongly* recommend that if you don't have it already, get pdftex,
and use pdflatex to do the work, rather than outputting a dvi and
then converting to PDF, which loses some useful information (pdftex
can do those cool bookmark sidebars, dvi AFAICT can't). Chances are,
you've already got pdftex set up on your system.
Also, bash has a "temporary FIFO" construct that should do what you
need - although if latex expects to be able to seek in the file, you
can forget it (actually, this could be an excellent reason why it
wouldn't support piping). But give it a try:
pdflatex <( ./parser.pl )
HTH, good luck
Micah