![]() Method "textToImage" public static byte textToImage(String text, java.awt. : Convert text to image whith the font Google Font NotoSans png = .getInstance(textToImage(TEXT_HINDI,font)) Set.addFont("fonts/NotoSansTamil-Regular.ttf") ĭtFontProvider(new FontProvider(set)) įor Itext5 and Hindi, I used the workaround of this site ( ) ![]() Set.addFont("fonts/NotoNaskhArabic-Regular.ttf") ![]() This blogpost gives some more background information and a way to select fonts automatically instead of setting them explicitly on the content elements: final PdfWriter writer = new PdfWriter("languages.pdf") įinal PdfDocument pdfDocument = new PdfDocument(writer) įinal Document document = new Document(pdfDocument) PdfFont f = PdfFontFactory.createFont("FreeSans.ttf", PdfEncodings.IDENTITY_H) PdfDocument pdfDoc = new PdfDocument(new PdfWriter("hindi.pdf")) If you want to use iText, you'll have to use iText 7 with the pdfCalligraph add-on. It is based on Unicode, and contains TrueType outlines and has been designed for use as a UI font. Mangal Regular is available in fonts and typefaces under font library in Microsoft docs. IText 5 does not fully support rendering of Hindi text. Mangal Regular is a popular hindi font which is a OpenType font for the Indic script - Devanagari developed by Microsoft.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |