Export to pdf and csv can't display chinese

export to pdf and csv can’t display chinese,pls help! thanks!

Hi!
Please, make sure that you’re using correct encoding at client side.
Could you provide a complete demo if still doesn’t work?

thanks for your reply, I bind the grid from xml file which encoded “UTF-8”,the contend of xml file data is

<?xml version='1.0' encoding='utf-8'?>

when grid exported as excel, the exported xls file display “1单元1楼1房” normally, but i got "1 1 1 " when exported as pdf.

I checked the source code file in grid-excel.war and grid-pdf.war, the encoding was the same between “PDFGenerate.java” and “ExcelGenerate.java” which were all encoded by “UTF-8”.

Unfortunately Java export library doesn’t support chinese characters correctly.

Do u has a schedule to solve the problem?Thanks

Hi,
try to open file PDFWriter.java and find the follow code inside:

pdf = new PDF();
f1 = new Font(pdf, "Helvetica");
f1.setSize(10);

Try to use “ZapfDingbats” instead of “Helvetica”.

Hi radyno,

Thanks for your reply,I have test instead of the font,but can’t display chinese yet.

You can have a look as below,
pdfjet.com/java/examples/example-04.html

Maybe should add chinese font class into PDFjet.jar and instead the font in PDFWriter.java

Hi,
you provided code for payable version of PDFJet.
We are using OpenSource version of this library and it has some differences.
By the way, it’s weird that changing font didn’t do the trick, it works at local machine.