RevisionOptions

RevisionOptions class

允许控制在布局过程中如何处理文档修订。

要了解更多信息,请访问转换为固定页面格式文档文章。

public class RevisionOptions

特性

姓名描述
CommentColor { get; set; }允许指定用于评论的颜色。 默认值为Red.
DeleteCellColor { get; set; }允许指定已删除单元格所使用的颜色Deletion. 默认值是Pink.
DeletedTextColor { get; set; }允许指定已删除内容所使用的颜色Deletion. 默认值是ByAuthor.
DeletedTextEffect { get; set; }允许指定应用于已删除内容的效果Deletion. 默认值是StrikeThrough
InsertCellColor { get; set; }允许指定插入单元格使用的颜色Insertion. 默认值是Blue.
InsertedTextColor { get; set; }允许指定插入内容所使用的颜色Insertion. 默认值是ByAuthor.
InsertedTextEffect { get; set; }允许指定应用于插入内容的效果Insertion. 默认值是Underline.
MeasurementUnit { get; set; }允许指定修订注释的测量单位。 默认值为Centimeters
MovedFromTextColor { get; set; }允许指定内容从哪里移动的区域使用的颜色Moving. 默认值是ByAuthor.
MovedFromTextEffect { get; set; }允许指定应用于内容移动区域的效果Moving. 默认值是DoubleStrikeThrough
MovedToTextColor { get; set; }允许指定内容移动到的区域所使用的颜色Moving. 默认值是ByAuthor.
MovedToTextEffect { get; set; }允许指定应用于内容移动到的区域的效果Moving. 默认值是DoubleUnderline
RevisedPropertiesColor { get; set; }允许指定用于更改格式属性的内容的颜色FormatChange 默认值为NoHighlight.
RevisedPropertiesEffect { get; set; }允许指定格式属性变化的内容区域的效果FormatChange 默认值为None
RevisionBarsColor { get; set; }允许指定用于标识包含修订信息的文档行的侧边栏的颜色。 默认值为Red.
RevisionBarsPosition { get; set; }获取或设置修订栏的渲染位置。 默认值为Outside.
RevisionBarsWidth { get; set; }获取或设置修订栏的宽度,单位为点。
ShowInBalloons { get; set; }允许指定修订是否在气球中呈现。 默认值为None.
ShowOriginalRevision { get; set; }允许指定是否显示原始文本而不是修订文本。 默认值为错误的.
ShowRevisionBars { get; set; }允许指定修订栏是否应在包含修订内容的行附近呈现。 默认值为真的.
ShowRevisionMarks { get; set; }允许指定修订文本是否应使用特殊格式标记。 默认值为真的.

例子

展示如何改变渲染输出文档中修订版本的外观。

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// 插入修订,然后将所有修订的颜色更改为绿色。
builder.Writeln("This is not a revision.");
doc.StartTrackRevisions("John Doe", DateTime.Now);
builder.Writeln("This is a revision.");
doc.StopTrackRevisions();
builder.Writeln("This is not a revision.");

// 删除出现在每个修订行左侧的栏。
doc.LayoutOptions.RevisionOptions.InsertedTextColor = RevisionColor.BrightGreen;
doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false;
doc.LayoutOptions.RevisionOptions.RevisionBarsPosition = HorizontalAlignment.Right;

doc.Save(ArtifactsDir + "Revision.LayoutOptionsRevisions.pdf");

也可以看看