Re: Is it possible to run lout without it writing to the file system?
Paul Zarucki <[email protected]>
| Newsgroups | gmane.comp.type-setting.lout |
|---|---|
| Message-ID | <[email protected]> |
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: [email protected] <mailto:[email protected]> W: www.electronic-equipments.co.uk <http://www.electronic-equipments.co.uk/> / / Technical Services /