user2556254 user2556254 - 13 days ago 6
Android Question

Error of characters in PDF Polish language

I am generating PDF on android for the language of Poland with the iText library, version 2 (

com.lowagie
). The problem is that the characters are wrong. Can anyone help me? How do I display the correct character from Poland in PDF?

Answer
Font fontNormal = FontFactory.getFont((winfontpath), encoding,BaseFont.EMBEDDED, 10, Font.NORMAL);
Chunk chunkpoland = new Chunk("hai welcome", fontNormal);
cell = new PdfPCell(new Phrase(chunkpoland ));
winfontpath=C:\\windows\\fonts\\SimHei.ttf

This is chinees font but you can assign polish font path