lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lout and PDF


From: Jeff Kingston
Subject: Re: lout and PDF
Date: Fri, 05 Sep 2008 07:52:44 +1100

Christopher Wolfe <address@hidden> wrote:
> Converting the PDF files outside of Lout run requires me
> to find a temporary home for them on my server...  I'd
> prefer to convert them in-line.

Fair enough, but then we have the major disadvantage that
the Lout binary is linked to some other piece of software
by a call to system().

A better approach in these cases is for the user who wants
such a link to make a definition with a @Filter symbol; then
only the user concerned has to worry about that other piece
of software.  @Filter is used to convert program texts into
Lout source by calling the prg2lout program, for example.

Using @Filter to convert PDF to EPS is somewhat unusual
because the result of, say, the user-defined symbol

    @IncludePDFGraphic { bush_and_mccain.pdf }

has to be the Lout source

    @IncludeGraphic { bush_and_mccain.eps }

with "bush_and_mccain.eps" being the name of a temporary EPS
file on the server which is created by the filter; it has to
be cleaned up somehow afterwards, by "rm *.eps" or whatever.

I'm assuming here that the aim is not to avoid creating a
temporary file at all, but rather to make sure that it is
only created on demand, and removed afterwards.  The
previously posted solution did not avoid the temporary file.

Avoiding the temporary file altogether would be hard, because
Lout reads the EPS file twice:  early on to get the bounding
box, and later to copy the file into the PostScript output.

Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]