pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkuehler <andr...@lehmi.de>
Subject Re: Scratch files - too many files open
Date Tue, 02 Jun 2015 15:48:45 GMT
Hi,

Am 02.06.2015 um 16:15 schrieb Jesse Long:
> Hi All,
>
> Regarding PDFBOX-2301, and the use of scratch files: right now, each COSStream
> uses one or two scratch files.
>
> I recently ran into the problem on Linux where the max number of open files
> allowed to the JVM by the OS was reached because of this.
>
> Is there a plan around this?
>
> Is it maybe that my use case is not expected?
I'm aware of that. The refactoring is still in progress. I expect to reduce the 
number of open files.

> My use case is:
> Open PDDocument 1
> Open PDDocument 2
> for a few hundred times
>          import page 1 of PDDocument 1 into PDDocument 2 and overlay some stuff
> ontop.
> save PDDocument 2.
>
> I have written a patch to use one single java.io.RandomAccessFile as a scratch
> file per COSDocument, using pages in a doubly linked list to separate streams in
> the same file. Would you be interested in adding this to PDFBox?
To use one file only led to problems when creating pdfs from scratch. It is 
possible to write to 2 COSStreams at the same time which corrupts pdf.

> Thanks,
> Jesse
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org

BR
Andreas Lehmkühler


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message