Unicode symbols in iTextSharp

前端 未结 2 1597
我寻月下人不归
我寻月下人不归 2020-12-21 07:37

I\'m trying to use a Unicode symbol in my PDF file with iTextSharp.

Dim base As BaseFont = BaseFont.CreateFont(\"C:\\\\WINDOWS\\\\Fonts\\\\WINGDING.TTF\", Ba         


        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-21 07:46

    The code appears to be a Visual Basic port of a C# project, since the string that holds the path to the font file has escaped backslashes in it -meaning "C:\WINDOWS\FONTS\WINGDING.TTF".

    This is an error in VB, which is probably trying to find a file located at "C:\\WINDOWS\\FONTS\\WINGDING.TTF".

    Chris' code, which apparently works, also points in that direction; since the escaped backslashes are one of its few differences.

提交回复
热议问题