I can't add the ₺ (Turkish Lira) icon to the file with Java PDFWriter

140 views Asked by At
BaseFont bfSpecial = BaseFont.createFont("get_font/verdana.ttf",BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

Font my_font = new Font(bfSpecial, 9, Font.BOLD, BaseColor.BLACK);
    
document.add(new Paragraph("\n",my_font));
document.add(new Paragraph("*(₺₺₺₺₺)*",my_font));
document.add(new Paragraph("\n",my_font));

My Output
image

How to View the ₺ (Turkish Lira) sign on PDF?

1

There are 1 answers

3
Mustafa IŞIK On BEST ANSWER

I finally solved the problem. I just had to use the font "DejaVuSerif.ttf" for the solution. you can download the font here

BaseFont bfSpecial = BaseFont.createFont("get_font/DejaVuSerif.ttf",BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font font = new Font(bfSpecial, 9, Font.NORMAL, BaseColor.BLACK);