Guillermo wrote: > Hi, > > I'm trying to write some PDF in Japanese and all the Japanese text disappear > every time, can you please help me? > > Document document = new Document(PageSize.A4.rotate(), 60, 60, 40, 40); > this.initItextWriter(document, out); document.open(); > this.model.getEncoding(); > Paragraph para = new Paragraph(new Chunk("werwer[友達ぎょとう駅魚等苦]werwer", > FontFactory.getFont("c:\\windows\\fonts\\msgothic.ttc,1", 10))); > para.setAlignment(Paragraph.ALIGN_CENTER); > document.add(para); > document.close(); > > When I look to my PDF file the text is just werwer[]werwer but the fonts are > MS-PGothic and MS-PGothic (Embedded Subset)
See another answer I've just posted. Try using the unicode notation of the glyphs that are missing. Does this example work for you? http://1t3xt.info/examples/browse/?page=example&id=144 If it does, we've found the culprit: the encoding used to compile your code is wrong. > Ps.- iTextAsian and iTextAsiaCmaps are in the path. This is irrelevant: you don't need iTextAsion and iTextAsianCmaps if you have the font msgothic.ttc -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php