Note: - this code is from the iTextDotNet version so it is a bit out of
date from the latest Java version. But the version of iText I have has
this same issue.

 

When you use the font Arial for example, it first looks for Arial and
when that fails, it throws a DocumentException. It then looks for
arial.ttf, finds that, and returns the font. On .NET at least the
throw/catch of the exception was taking a lot of time - about 80% of the
PDF generation time in the sample we were running. I changed it to the
attached code and our PDF generation is now 5 times faster on .NET.

 

The attachment is a zip file.

 

Thanks - dave

 

 

 

 

David Thielen

www.windwardreports.com

303-499-2544 x1185

 

Cubicle Wars - http://www.windwardreports.com/film.htm

 

Attachment: tweaks.dave
Description: tweaks.dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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/

Reply via email to