amit.marwadi (2) [Avatar] Offline
#1
Hi,

I am trying to create PDF which will have table format and text in Japanese and many other languages.

My code is like -

*****************************************************************************
PrintWriter out = new PrintWriter(new BufferedWriter(
new OutputStreamWriter(new FileOutputStream (saveFile))));
BufferedReader lineReader = new BufferedReader(
new StringReader(simpleHtmlText));
String line;
while ((line = lineReader.readLine()) != null)
out.println (line);
lineReader.close();
out.flush();
out.close();

Document document = new Document(PageSize.A3, 0, 0, 90, 110);
PdfWriter.getInstance(document, new FileOutputStream(path+".pdf"));
document.open();
HTMLWorker worker = new HTMLWorker(document);
FileReader reader = new FileReader(path+".html");
worker.parse(reader);
reader.close();
*****************************************************************************

Here I am writing HTML file and then parsing that file to PDF, but i am getting questions marks for Japanease character.

Please guide me. how i need to code?

Thanks.
blowagie (284) [Avatar] Offline
#2
Re: Creating PDF with Japanese character
amit.marwadi (2) [Avatar] Offline
#3
Re: Creating PDF with Japanese character
I am sorry.