如何使用C#代码动态的为文档添加 "文件 -> Word选项 -> 高级 -> 为尾部空格添加下划线"这个配置项呢?谢谢。
我有找到一份Sprie.Doc.xml文档,上面有找到一个Spire.Doc.Documents.CompatibilityOptions.DontULTrlSpc属性项,但是没能找到如何使用这个属性项,多谢各位告知。
Document doc = new Document();
Section sec = doc.AddSection();
Paragraph para = sec.AddParagraph();
string blanks = "test ";
Spire.Doc.Fields.TextRange tr = para.AppendText(blanks);
tr.CharacterFormat.UnderlineStyle = UnderlineStyle.Single;
//下面参数设置为true
doc.CompatibilityOptions.UlTrailSpace = true;
doc.SaveToFile("output.docx", Spire.Doc.FileFormat.Docx);