By Date: <-- -->
By Thread: <-- -->

RtfWriter2: OutOfMemory, with patch



On Wednesday 23 August 2006 13:58, Dirk Möbius wrote:
> RtfWriter2 reads the whole document in memory, even if dataCacheStyle is
> set to CACHE_DISK. When generating large documents, this could lead to
> OutOfMemory exceptions. This happened to be the case in our reporting
> system.
>
> The problem is in RtfDocument.writeDocument(), which reads the whole disk
> cache into memory before writing it into the final output stream.
Thanks for the bug report and the patch.

I had actually caught that bug earlier this week while doing some clean-up 
work and had already prepared, but not committed a patch. I've now committed 
my patch. Please check that it fixes your problem.

The patch also changes the way you specify the cache style. You should now use

writer2.getDocumentSettings.setDataCacheStyle(...)

Greetings,
Mark
-- 
The lunatic, the lover, and the poet,
Are of imagination all compact...
		-- Wm. Shakespeare, "A Midsummer Night's Dream"

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc

Attachment: pgpZ1BPuK4Cuf.pgp
Description: PGP signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions