FontSelector worked great.  I have provided an example of the code I used.

BaseFont bf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H",
BaseFont.NOT_EMBEDDED); (used for Chinese)

FontSelector sel = new FontSelector();
sel.addFont(new Font(Font.HELVETICA, 14, Font.NORMAL));
sel.addFont(new Font(Font.TIMES_ROMAN, 14, Font.NORMAL));
sel.addFont(new Font(Font.ZAPFDINGBATS, 14, Font.NORMAL));
sel.addFont(new Font(Font.SYMBOL, 14, Font.NORMAL));
sel.addFont(new Font(bf, 14, Font.NORMAL));

textToConvert = "some text in any language";
Phrase ph = sel.process(textToConvert);
cell = new PdfPCell(new Paragraph(ph));




Paulo Soares wrote:
> 
> FontSelector may help you. 
> 
> Paulo
> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] On 
>> Behalf Of [EMAIL PROTECTED]
>> Sent: Thursday, February 28, 2008 6:21 PM
>> To: [email protected]
>> Subject: [iText-questions] iText fonts for Danish and Chinese 
>> characters
>> 
>> I am pulling names from a database and displaying it on pdfs. 
>>  I don't know what language it is when I pull the name - the 
>> names could be any language - Danish, Chinese, etc.  I have 
>> tried different combinations and I cannot seem to get a font 
>> that will display Chinese and Danish fonts together.  Any 
>> help would be appreciated. thx.
>> 
>> I have tried the following:
>> 
>> BaseFont bfChineseAndEnglish = 
>> BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", 
>> BaseFont.NOT_EMBEDDED); - this works for Chinese but not for Danish
>> 
>> BaseFont bfChineseAndEnglish = 
>> BaseFont.createFont("c:\\windows\\fonts\\comic.ttf", 
>> BaseFont.IDENTITY_H, BaseFont.EMBEDDED); - this works for 
>> Danish but does not display Chinese.
> 
> 
> 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: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/iText-fonts-for-Danish-and-Chinese-characters-tp15742921p15760732.html
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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