问题
i have problem is importing the icons (fontawesome-webfont.ttf) and showing them on PDF -but i am unable to show them on the PDF especialy currency icon (fa-money) some of the icons i was able to get it from the CultureInfo class if any thing i missed apart from this
chunkRows = new Chunk(val.ToString("C", new CultureInfo(strCulture)) + " ", rowFont);
How can i solve this problem needed help
Code---
var fontAwesomeIcon = BaseFont.CreateFont(fontpath + "fontawesome-webfont.ttf", BaseFont.CP1252, BaseFont.EMBEDDED);
Font fontAwe = new Font(fontAwesomeIcon,8,Font.NORMAL,Color.BLACK);
chunkRows = new Chunk("\f0d6", fontAwe);
回答1:
Please adapt your code like this:
var fontAwesomeIcon = BaseFont.CreateFont(fontpath + "fontawesome-webfont.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font fontAwe = new Font(fontAwesomeIcon, 8);
chunkRows = new Chunk("\uf0d6", fontAwe);
The result will look like this:

来源:https://stackoverflow.com/questions/30440982/c-sharp-itextsharp-fontawesome-icons-currency-pdf