Reputation: 21
I am facing problem with displaying the chinese , russian etc local languages characters.It is showing blank there.Using the itext. Is there a some standard encoding and font which after converting every character into unicode hexadecimal will take care.
Upvotes: 2
Views: 9354
Reputation: 1
Try using FontSelector. You can add multiple fonts and it will process your text and use the different fonts where appropriate.
FontSelector selector = new FontSelector();
selector.addFont(FontFactory.getFont(FontFactory.TIMES_ROMAN, 12));
selector.addFont(FontFactory.getFont("MSung-Light",
"UniCNS-UCS2-H", BaseFont.NOT_EMBEDDED));
Phrase ph = selector.process(TEXT);
document.add(new Paragraph(ph));
from http://itextpdf.com/examples/iia.php?id=214
Upvotes: 0
Reputation: 240996
Make your pdf encoding to UTF-8
use font that supports unicode,
Here is similar Question
BaseFont unicode =
BaseFont.createFont("c:/windows/fonts/arialuni.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Also see:
Upvotes: 2