bug-enscript
[Top][All Lists]
Advanced

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

Re: [bug-enscript] enscript and temp file location


From: Giulio Orsero
Subject: Re: [bug-enscript] enscript and temp file location
Date: Fri, 25 Apr 2008 10:15:05 +0200

On Fri, 25 Apr 2008 00:22:40 +0100, Tim Retout <address@hidden> wrote:

>On Thu, 2008-04-24 at 12:25 +0200, Giulio Orsero wrote:

>> Is there a way to have enscript create temp files in another dir?

>enscript currently uses the tmpfile() function from glibc to create
>temporary files:
>
>http://www.gnu.org/software/libc/manual/html_node/Temporary-Files.html
>
>It might be possible to use mkstemp() instead with a configurable
>location, but it seems a bit complicated to me.
>
>I would recommend that you free some space in /tmp, to be honest - are
>these files really that large?

I've got input ascii files of thousands of pages each that I have to convert
to PDF.

Right now I process them by:
1 - adding some enscript font escape sequences here and there (depending on
some custom tags contained in the ascii files)
2 - add an enscript EPS include (500k) for every single page (logo overlay)
3 - convert from ascii to ps using enscript
4 - convert ps to pdf with ps2pdf

It seems phase 2 is problematic, because, even though the included EPS is
the same for all the pages, enscript will include it thousand of times, thus
creating big tmp files and a big final ps file.
ps2pdf will cut the size of the final pdf file down to about 20MB since the
EPS logo is included only once in the PDF.

I could change my system by manually including the EPS logo as a "postscript
form" in the postscript stream, but this would require some work and
testing, so I'd prefer to keep using the brute force method if temp files
could be placed in a custom dir.

The system was implemented this way because initially the ascii files were
quite small (10/100 pages at max), only recently I was tasked with using
this big input files.

Thanks
-- 
address@hidden




reply via email to

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