For my web project, I use itextpdf 5.5.4. I have a HTML table with Chinese characters. Here is how the table is displayed in PDF:
Strint tableString = a_string_of_HTML_table_with_Chinese_chaacters;
XMLParser parser = new XMLParser(xmLWorker);
parser.parse(new ByteArrayInputStream(tableString.getBytes("UTF-8")));
With the above code, Chinese character 月 (which means month in English) is displayed as 月
in PDF.
In Eclipse (the IDE), I am able to see Chinese characters display correctly in tableString
. I tried the parse method with different signatures, but with no success. I cannot upgrade to use the latest version of itextpdf due to various project reasons.