> On 7 Jan 2015, at 13:56, Andreas Lehmkuehler <andr...@lehmi.de> wrote:
> 
> Hi,
> 
> Am 07.01.2015 um 22:42 schrieb John Hewson:
>> Hi All,
>> 
>> I’d like to bring PDFBOX-2592 to the attention of the dev mailing list.
>> 
>> A number of users on the mailing list have asked about how to import pages 
>> from other PDFs as forms, our current solution is LayerUtility, which is 
>> depends on PDFCloneUtility.
>> 
>> However, the design of the COS API allows for sharing of COS objects between 
>> documents (in the same thread). So there’s no need for all the copying and 
>> cloning. With only a few minor changes we could get this working robustly. 
>> It might also help simplify splitting and merging.
>> 
>> I like this idea a lot and it’s pretty simple - any thoughts?
> We should wait until the COSStream is refactored (split compressed and 
> umcompressed stream, optimize the data handling memory vs. file) and see if 
> your idea will still work.

I should clarify that I’m not proposing any changes to COSStream beyond adding 
an isClosed() method. The relationship between COSDocument and COSStream will 
also be unchanged, COSDocument#close() will still call COSStream#close() as it 
currently does .

What I’m proposing is mostly a change to COSStream#close(). All of the same 
close() calls will still be made to the same streams, it’s just the var = null 
statements which I want to remove, so that objects from closed documents are 
still usable (except for COSStream, hence the need for isClosed()).

>> -- John
> 
> BR
> Andreas Lehmkühler

Reply via email to