使用gios.word.worddocument在asp.net中的错误charset



我已经继承了ASP.NET项目,该项目正在使用gios.word.worddocument生成一些Word文档。

我的问题是,在我的计算机上,所有情况都可以使用捷克语言环境,但是在英语版服务器上,缺少一些变量。我在这个库中没有经验,所以我不知道从哪里开始。

基本上是这样的工作:

Gios.Word.WordDocument rd = new WordDocument(WordDocumentFormat.A4);
Font fontRegular = new Font("Arial", 10, FontStyle.Regular);
rd.SetFont(fontRegular);
var rt = rd.NewTable(fontRegular, Color.Black, rows, 2, 10);
WordCell title = rt.Rows[0][0];
title.SetFont(fontRegular);
title.Write("dle vzoru přílohy č. 2 Nařízení vlády č. 201/2010Sb.");
rd.SaveToFile("/* path to file */");

服务器上的不良结果看起来像是此dle vzoru prílohy c. 1 Narízení vlády c. 201/2010Sb.

我试图以这种方式设置字体:

Font fontBold = new Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Point, 238); // 238 eastern europe charset byte

但没有呼唤。

最后,我修改了此库以在Unicode中生成RTF。修改版本源发表于:

https://github.com/fandacz/gios.word

相关内容

最新更新