I want to export a .pdf file. That step is ok. But the problem I have is that this PDF does not show our native language. An example, English words are fine, but Chinese words are not shown in the report. How can we show the Chinese words too? We are programming in VB.NET.
A:
You want to set the PDF to use unicode to display chinese characters. Depends how you export the PDF file. If you use XSL-FO you convert the characters to their unicode equivalent in teh following format:
&#<UnicodeNumber>
Russell
2009-08-12 10:08:42
A:
I have had good luck using the itextsharp library to create pdf files from my VB.NET apps. The important thing to remember for proper display of alternate characters sets (Russian, Chinese, Japanese, etc.) is to use IDENTITY_H encoding when creating the BaseFont.
Dim bfR As iTextSharp.text.pdf.BaseFont
bfR = iTextSharp.text.pdf.BaseFont.CreateFont("MyFavoriteFont.ttf", iTextSharp.text.pdf.BaseFont.IDENTITY_H, iTextSharp.text.pdf.BaseFont.EMBEDDED)
Stewbob
2009-08-13 20:18:54