What you are experiencing can also happen with other CJK languages. You
are in one of these situations:
1 - The character is in the Unicode basic plane (0000-ffff) but the
glyph doesn't exist in the font. You'll have to get another font.
2 -The character is not in the basic plane and need 32 bit to be
described. iTextAsian.jar won't work, you'll need iTextAsianCmaps.jar.
This is described in page 252 of the book "iText in Action" but I'll
paste a small example.
PdfEncodings.loadCmap("GBK2K-H", PdfEncodings.CRLF_CID_NEWLINE);
byte text[] = my_GB_encoded_text;
String cid = PdfEncodings.convertCmap("GBK2K-H", text);
BaseFont bf = BaseFont.createFont("STSong-Light", BaseFont.IDENTITY_H,
BaseFont.NOT_EMBEDDED);
Paragraph p = new Paragraph(cid, new Font(bf, 14));
document.add(p);
In your case the cmap would be one of the CNS encodings.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Bart Elshout
> Sent: Tuesday, April 10, 2007 1:49 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] (no subject)
>
> Hi all,
>
> I have a question about the support of Asian Characters.
>
> We are generating PDF reports via Java-sevlets. We are using the
> iTextAsian.jar to use the different Asian fonts.
>
> Everything is displayed ok, but some of the characters are
> not displayed. We
> are reading labels from files in different languages. The
> only one which has
> bugs so far as I can read is the Traditional Chinese translation file
> (Taiwan).
>
> The bug is some missing characters. We are reading the
> unicodes from the
> files and some unicodes are skipped and displayed in the PDF
> as space. When
> I test them in the normal (not Itext/PDF) part of our application the
> unicodes are all translated also the ones which are not
> working in the
> Itext/PDF part.
>
> Does someone have experience with such kind of problems or
> with reports in
> Traditional Chinese (Taiwan)? I hope someone can help me with
> this problem.
>
> Thanks in advance and kind regards,
>
> Bart Elshout
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.
-------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/