lout-users
[Top][All Lists]
Advanced

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

Re: Is it possible to run lout without it writing to the file system?


From: Paul Zarucki
Subject: Re: Is it possible to run lout without it writing to the file system?
Date: Sun, 11 Sep 2011 13:36:38 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110505 Icedove/3.0.11

Hi,

I don't know the answer to your question but I do know a workaround. The special files, which lout needs when doing multiple passes, are created in the current directory, hence conflicts can be avoided by ensuring that each instance of lout runs in its own working directory. You can create a temporary directory for this purpose and delete it when finished. I use lout in this way to generate typeset documents in a web application. The web application creates a temporary directory with a unique name (based on the session id), runs lout in that directory then deletes the directory. The PHP code is something like

mkdir $tempdir;
file_put_contents($tempfile,$lout_document,LOCK_EX);
$cmd = "cd $tempdir ; lout -r 3 -PDF $tempfile ; rm * ";
$pdf_document = sys_exec($cmd);
rmdir($tempdir);

where $tempdir is the path of the temporary directory, $lout_document is the input to lout and $pdf_document is the PDF output.

If security is a particular concern then you could create an encrypted file system on the fly to hold the temporary directory and delete the encrypted file system when finished, for example.

Regards,
Paul.

On 11/09/11 01:52, Daniel Kauffman wrote:
Is it possible to run lout without it writing to the file system?

When I run the following:

  piped input | lout -PDF | piped output

Lout writes to special files:

  -.ld
  lout.li

Is it possible to prevent this?

Being able to run lout without writing to the file system would be useful in situations such as the following:

  * When multiple instances of lout are running simultaneously, so that
    the various instances do not clobber each other.

  * When the generated pdf is used only once, for example, in web
    applications.

Regards,

Daniel Kauffman
Lead Developer
Rock Solid Solutions, LLC

--

Electronic Equipments Ltd.
101 Ridgeway Avenue, Dunstable, Bedfordshire, LU5 4QN, United Kingdom
T: +44 (0) 1582 511335 - F: +44 (0) 870 235 1877
E: address@hidden
W: www.electronic-equipments.co.uk

Technical Services


reply via email to

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