HyphenationOptions
Document.HyphenationOptions property
提供对文档连字符选项的访问。
public HyphenationOptions HyphenationOptions { get; }
例子
展示如何配置自动连字。
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Font.Size = 24;
builder.Writeln("Lorem ipsum dolor sit amet, consectetur adipiscing elit, " +
"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
doc.HyphenationOptions.AutoHyphenation = true;
doc.HyphenationOptions.ConsecutiveHyphenLimit = 2;
doc.HyphenationOptions.HyphenationZone = 720;
doc.HyphenationOptions.HyphenateCaps = true;
doc.Save(ArtifactsDir + "Document.HyphenationOptions.docx");
也可以看看
- class HyphenationOptions
- class Document
- 命名空间 Aspose.Words
- 部件 Aspose.Words