Closed bangieff closed 5 years ago
You will need to load a custom font for cyrilic characters. The default font that is used for tables in easytable is PDType1Font.HELVETICA
and it doesn't support them. So you will also experience the same issue if you just use PDFbox and create a PDF with the text you mentioned:
final PDPageContentStream contentStream = new PDPageContentStream(document, page);
final String text = "Проба";
contentStream.beginText();
contentStream.setFont(PDType1Font.HELVETICA, 12);
contentStream.newLineAtOffset(50, page.getMediaBox().getHeight() - 50);
contentStream.showText(text);
contentStream.endText();
contentStream.close();
You would need to load a font that supports it and then pass it as an argument to the table builder: tableBuilder.font(<YOUR_FONT>)
.
For more information have a look here:
So basically this is not an easytable issue, so I will close it ;)
I tried creating a table with cyrillic text in it, but I get an exception in TableDrawer->draw(); The same snippet works fine with text in English.