.Net Core 遇到 “'windows-1252' is not a supported encoding name.”
最近用 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.”的更多相关文章
- 在离线环境中发布.NET Core至Windows Server 2008
在离线环境中发布.NET Core至Windows Server 2008 0x00 写在开始 之前一篇博客中写了在离线环境中使用.NET Core,之后一边学习一边写了一些页面作为测试,现在打算发布 ...
- Windows 1252和ISO 8859-1之间的区别(ISO 8859-1就是Latin-1,但1252与Latin1略有不同)
2.6.5. ANSI字符编码和Windows 1252 Windows为了支持英语和西欧字符,自己设计了一个编码,对应的在Code Page号是1252,被称为Windows 1252. Windo ...
- 使用.NET Core创建Windows服务(二) - 使用Topshelf方式
原文:Creating Windows Services In .NET Core – Part 2 – The "Topshelf" Way 作者:Dotnet Core Tut ...
- 使用.NET Core创建Windows服务 - 使用.NET Core工作器方式
原文:Creating Windows Services In .NET Core – Part 3 – The ".NET Core Worker" Way 作者:Dotnet ...
- .NET Core 创建Windows服务
.NET Core 创建Windows服务 作者:高堂 原文地址:https://www.cnblogs.com/gaotang/p/10850564.html 写在前面 使用 TopShelf+Au ...
- 使用.NET Core创建Windows服务(一) - 使用官方推荐方式
原文:使用.NET Core创建Windows服务(一) - 使用官方推荐方式 原文:Creating Windows Services In .NET Core – Part 1 – The &qu ...
- 【转】.net core开发windows服务
.net core开发windows服务 文建Blog
- 我的第一个.NET Core App Windows系统
一.前言 本篇开发环境?1.操作系统: Windows 10 X642.SDK: .NET Core 2.0 Preview 二.安装 .NET Core SDK 1.下载 .NET Core下载地址 ...
- .net core compatibility windows & windows compatible Linux
Who is this package for? This package is meant for developers that need to port existing .NET Framew ...
- ASP.NET Core 的Windows和IIS宿主(自动翻译记录)
https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x 支持的操作系统 以下操作系统的支持: Win ...
随机推荐
- 编程语言及python介绍
编程语言及python介绍 1.编程语言分类 机器语言 优点:执行效率高 缺点:开发效率极低,跨平台性差 汇编语言 优点:较机器语言执行效率稍低 缺点:较机器语言开发效率稍高,仍然很低,跨平台性差 高 ...
- 每天一道Rust-LeetCode(2019-06-02)
每天一道Rust-LeetCode(2019-06-02) Z 字形变换 坚持每天一道题,刷题学习Rust. LeetCode原题 Z 字形变换 题目描述 将一个给定字符串根据给定的行数,以从上往下. ...
- java 读写Parquet格式的数据 Parquet example
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOExce ...
- Vue 分页功能伪代码实现
Vue分页功能的实现 其实分页功能是一个比较简单的demo 后端写好pageNum和pageSize的接口直接传参就是了 // 这里我们假设后端已经写好了 pageNum和pagesize <v ...
- python paramiko的使用介绍
一: 使用paramiko #设置ssh连接的远程主机地址和端口t=paramiko.Transport((ip,port))#设置登录名和密码t.connect(username=username, ...
- Qt常用类——QFrame类与QWidge类
QFrame与QWidget的区别: QFrame是基本控件的基类,QWidget是QFrame基类. QWidget类是所有用户界面对象的基类. Widget是用户界面的基本单元:它从窗口系统接收鼠 ...
- javascript中的作用域和变量提升
js的运行主要分两个阶段:js的预解析和运行,预解析阶段所有的变量声明和函数定义都会提前,但是变量的赋值不会提前.
- pycharm默认注释与快捷键功能
pycharm快捷键使用技巧 Ctrl+d 复制当前行.或者选择的块Ctrl+n 跳转到类Ctrl+shift+n 快速查找文件名Ctrl+shift+f 全局查找,快速查找关键字的文件Ctrl+sh ...
- Centos开发小计
1. 生成静态库,linux下库的规则是lib开头 g++ -c code.cpp ar cr libcode.a code.o
- [技术博客] Springboot的Controller类使用
Springboot的Controller类使用 @Controller:处理http请求. 代码: @Controller public class QuestionController { ... ...