That's a good idea, throwing exceptions can be time consuming. I think
I'll put an extra parameter in BaseFont.createFont() to have it return
null instead of throwing an exception.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of David Thielen
> Sent: Friday, April 13, 2007 9:44 PM
> To: itext
> Subject: [iText-questions] Feature suggestion
>
> 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
>
>
>
>
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of 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/