使用iTextSharp生成Pdf文件時報錯以下:html
'windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
Parameter name: namewindows
須要在 NuGet 裏添加 System.Text.Encoding.CodePageside
須要在程序裏註冊下,在報錯語句前加入:code
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);