且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Itextsharp特殊字符,如<

更新时间:2021-11-04 08:24:31

如果您知道特殊字符的实体编号,则可以使用以下代码轻松创建该特殊字符.

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));

用您的实体号代替945.希望这会有所帮助.

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

如果您拥有带有所需符号的字体,则iTextSharp中的FontSelector类将为您提供进一步的帮助.

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