Hello,
We are running into situations where we are receiving large uploaded text
files 6 meg in size. We are attempting to convert to pdf and seeing the
thread hang CPU max at 100% and the operation never returns. We are using
iText version 1.3.4 jdk version jdk 1.5_07
Here is our code
public static void createPdfFromString (String aSourceString,
OutputStream aOutputStream)
throws Exception
{
try
{
Document myDocument = new
Document(PageSize.A4,5.0f,5.0f,40.0f,40.0f);
PdfWriter myPdfWriter = PdfWriter.getInstance(myDocument,
aOutputStream);
myDocument.open();
Paragraph myParagraph = new Paragraph(12,aSourceString,new
Font(Font.COURIER,10));
myDocument.add(myParagraph);
myDocument.close();
}
catch (Exception myException)
{
throw myException;
}
}
Is there a size limit that we should be guarding against? Or another way
to optimize this code?
________________________________________________________________________________________________
Scott Tyriver § Systems Development § Mortgage Guaranty Insurance
Corporation
250 East Kilbourn Avenue § Milwaukee WI 53202 § ( 414.347.6803 § 7
414.347.6710 § * [EMAIL PROTECTED]
This message is intended for use only by the person(s) addressed above and
may contain privileged and confidential information. Disclosure or use of
this message by any other person is strictly prohibited. If this message
is received in error, please notify the sender immediately and delete this
message.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/