Thomas wrote:

Hi

I have to concatenate almost 25 individual PDF's to a single one,and depending on the type i have to stamp (edit) on some documents.I am using Arial font for stamping contents on to the PDF file.I have created a utility class having methods for each operation like one for Reading one for concatenation one for editing and so on. The problem is when i run it in WSAD it is working fine.The total file size is up to 3MB.But when I load it in the server It is not even able to serve one request.The server is thowing Out Of memory error.

There are ways to limit memory use, for instance construct the PdfReader with the class RandomAccessFileOrByteArray instead of a String (filename), and code can often be optimized so that unnecessary objects aren't kept in memory for too long. You should look at the memory use and try to tune your code. But remember that stamping and copying does NEED some memory. For instance: I have a 5 kbytes PDF, when read fully by PdfReader it takes 30 kbytes. The reason? (1) the objects that hold the document need memory and (2) the 5 kbytes represent a compressed document, when read by iText, the content is being decompressed.
br,
Bruno


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to