最近用 iTextSharp 拆分 Pdf 文档加水印的时候遇到错误:windows-1252 is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvid...
![](https://oss.womengda.net/imgfile/2309/1E4133c4NU0-341495.jpg)
最近用 iTextSharp 拆分 Pdf 文档
加水印的时候遇到错误:
'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: name
需要在 NuGet 里添加 System.Text.Encoding.CodePages
然后在程序里注册下就可以了
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
iTextSharp 还是很好用的
就是不能 Pdf 转图片或生成缩略图…
本文标题为:.Net Core 遇到 “'windows-1252' is not a supported encoding name.”
![](/xwassets/images/pre.png)
![](/xwassets/images/next.png)
- WPF使用DrawingContext实现绘制刻度条 2023-07-04
- Unity3D实现渐变颜色效果 2023-01-16
- user32.dll 函数说明小结 2022-12-26
- 如何使用C# 捕获进程输出 2023-03-10
- C# 使用Aspose.Cells 导出Excel的步骤及问题记录 2023-05-16
- Oracle中for循环的使用方法 2023-07-04
- 在C# 8中如何使用默认接口方法详解 2023-03-29
- c# 模拟线性回归的示例 2023-03-14
- Unity Shader实现模糊效果 2023-04-27
- .NET CORE DI 依赖注入 2023-09-27