Itextsharp special characters like <

杀马特。学长 韩版系。学妹 提交于 2019-12-11 07:32:41

问题


I am generating pdf using itextsharp i have one requirement to display << and >> in the pdf page how can i do this


回答1:


If you know the entity number of the special character you can create that special character simply by using the following code.

document.Add(Phrase.GetInstance(" This is " + (char)945));

Substitute your entity number instead of 945. Hope this helps.

Edit: FontSelector class in iTextSharp will help you further if you have the required font with the symbols.



来源:https://stackoverflow.com/questions/5726352/itextsharp-special-characters-like

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!