Encoding
LoadOptions.Encoding property
打开基于文本的文件或电子邮件消息(如 )时使用的编码CSV, TXT , 和MSG. 默认值为UTF8.
public Encoding Encoding { get; set; }
评论
了解更多
- 将 Excel 和 Apple Numbers 电子表格呈现为 HTML、PDF 和图像文件
 - 将文本文档呈现为 HTML、PDF 和图像文件
 - 将电子邮件呈现为 HTML、PDF、PNG 和 JPEG 文件
 
例子
该示例演示了此选项的典型用法。
LoadOptions loadOptions = new LoadOptions();
loadOptions.Encoding = Encoding.ASCII; //设置编码
using (Viewer viewer = new Viewer("message.txt", loadOptions))
{
    HtmlViewOptions viewOptions = 
        HtmlViewOptions.ForEmbeddedResources();
    viewer.View(viewOptions);
}
也可以看看
- class LoadOptions
 - 命名空间 GroupDocs.Viewer.Options
 - 部件 GroupDocs.Viewer