RevisionOptions Class

Allows to control how document revisions are handled during layout process.
Inheritance Hierarchy
SystemObject
  Aspose.Words.LayoutRevisionOptions

Namespace:  Aspose.Words.Layout
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public class RevisionOptions

The RevisionOptions type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleCommentColor
Allows to specify the color to be used for comments. Default value for this property is Red.
Remarks
If set this property to ByAuthor or NoHighlight values, as the result this property will be set to default color.
Public propertyCode exampleDeletedTextColor
Allows to specify the color to be used for deleted content Deletion. Default value for this property is ByAuthor.
Public propertyCode exampleDeletedTextEffect
Allows to specify the effect to be applied to the deleted content Deletion. Default value is StrikeThrough
Public propertyCode exampleInsertedTextColor
Allows to specify the color to be used for inserted content Insertion. Default value for this property is ByAuthor.
Public propertyCode exampleInsertedTextEffect
Allows to specify the effect to be applied to the inserted content Insertion. Default value is Underline.
Public propertyCode exampleMovedFromTextColor
Allows to specify the color to be used for areas where content was moved from Moving. Default value for this property is ByAuthor.
Public propertyCode exampleMovedFromTextEffect
Allows to specify the effect to be applied to the areas where content was moved from Moving. Default value is DoubleStrikeThrough
Public propertyCode exampleMovedToTextColor
Allows to specify the color to be used for areas where content was moved to Moving. Default value for this property is ByAuthor.
Public propertyCode exampleMovedToTextEffect
Allows to specify the effect to be applied to the areas where content was moved to Moving. Default value is DoubleUnderline
Public propertyCode exampleRevisedPropertiesColor
Allows to specify the color to be used for content with changes of formatting properties FormatChange Default value for this property is NoHighlight.
Public propertyCode exampleRevisedPropertiesEffect
Allows to specify the effect for content areas with changes of formatting properties FormatChange Default value is None
Public propertyCode exampleRevisionBarsColor
Allows to specify the color to be used for side bars that identify document lines containing revised information. Default value for this property is Red.
Public propertyCode exampleRevisionBarsWidth
Gets or sets width of revision bars, points.
Public propertyCode exampleShowInBalloons
Allows to specify whether the revisions are rendered in the balloons. Default value for this property is None
Public propertyCode exampleShowOriginalRevision
Allows to specify whether the original text should be shown instead of revised one. Default value for this property is false.
Public propertyCode exampleShowRevisionBars
Allows to specify whether revision bars should be rendered near lines containing revised content. Default value for this property is true.
Public propertyCode exampleShowRevisionMarks
Allow to specify whether revision text should be marked with special formatting markup. Default value for this property is true.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
Shows how to set a document's layout options.
Document doc = new Document();

Assert.IsFalse(doc.LayoutOptions.ShowHiddenText);
Assert.IsFalse(doc.LayoutOptions.ShowParagraphMarks);

// The appearance of revisions can be controlled from the layout options property
doc.StartTrackRevisions("John Doe", DateTime.Now);
doc.LayoutOptions.RevisionOptions.InsertedTextColor = RevisionColor.BrightGreen;
doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false;

DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln(
    "This is a revision. Normally the text is red with a bar to the left, but we made some changes to the revision options.");

doc.StopTrackRevisions();

// Layout options can be used to show hidden text too
builder.Writeln("This text is not hidden.");
builder.Font.Hidden = true;
builder.Writeln(
    "This text is hidden. It will only show up in the output if we allow it to via doc.LayoutOptions.");

doc.LayoutOptions.ShowHiddenText = true;

doc.Save(ArtifactsDir + "Document.LayoutOptions.pdf");
See Also