I am trying to generate a PDF using itextpdf 5.5.11 and xmlworker 5.4.2 jars respectively. When I run my java code locally on a WINDOWS machine, the Russian characters are getting displayed fine in the PDF generated. However, when the same Java code runs on a LINUX server, the russian characters are not getting displayed in the PDF generated.
I have tried installing fonts on the linux server under path /usrs/share/fonts. However, the issue still exists. Sharing the snippet of the code where Charset is also included while parsing the input html.
pdfdoc.open();
XMLWorkerHelper worker = XMLWorkerHelper.getInstance();
worker.parseXHtml(pdfWriter, pdfdoc, new ByteArrayInputStream(html), new ByteArrayInputStream(css),Charset.forName("UTF-8"));
pdfdoc.close();
The PDF should be generated with Russian characters irrespective of the server on which this java code is executed.