I have HTML page with Cyrillic letters and I use iText library for conversion from HTML to PDF. I don't use iText directly and use XMLWorkerHelper
for doing conversion:
OutputStream file = new FileOutputStream(outputFile);
Document document = new Document();
PdfWriter writer = PdfWriter.getInstance(document, file);
document.open();
InputStream is = new ByteArrayInputStream(htmlContentString.getBytes());
XMLWorkerHelper.getInstance().parseXHtml(writer, document, is);
document.close();
writer.close();
file.close();
Unfortunately, I can't see Cyrillic letters in output PDF file at all.
How can I prepare source HTML file (some font tags, CSS attributes etc.) for getting PDF output properly?