RevisionOptions class

RevisionOptions class

Allows to control how document revisions are handled during layout process. To learn more, visit the Converting to Fixed-page Format documentation article.

Properties

NameDescription
comment_colorAllows to specify the color to be used for comments. Default value is RevisionColor.RED.
deleted_text_colorAllows to specify the color to be used for deleted content RevisionType.DELETION. Default value is RevisionColor.BY_AUTHOR.
deleted_text_effectAllows to specify the effect to be applied to the deleted content RevisionType.DELETION. Default value is RevisionTextEffect.STRIKE_THROUGH
inserted_text_colorAllows to specify the color to be used for inserted content RevisionType.INSERTION. Default value is RevisionColor.BY_AUTHOR.
inserted_text_effectAllows to specify the effect to be applied to the inserted content RevisionType.INSERTION. Default value is RevisionTextEffect.UNDERLINE.
measurement_unitAllows to specify the measurement units for revision comments. Default value is MeasurementUnits.CENTIMETERS
moved_from_text_colorAllows to specify the color to be used for areas where content was moved from RevisionType.MOVING. Default value is RevisionColor.BY_AUTHOR.
moved_from_text_effectAllows to specify the effect to be applied to the areas where content was moved from RevisionType.MOVING. Default value is RevisionTextEffect.DOUBLE_STRIKE_THROUGH
moved_to_text_colorAllows to specify the color to be used for areas where content was moved to RevisionType.MOVING. Default value is RevisionColor.BY_AUTHOR.
moved_to_text_effectAllows to specify the effect to be applied to the areas where content was moved to RevisionType.MOVING. Default value is RevisionTextEffect.DOUBLE_UNDERLINE
revised_properties_colorAllows to specify the color to be used for content with changes of formatting properties RevisionType.FORMAT_CHANGE Default value is RevisionColor.NO_HIGHLIGHT.
revised_properties_effectAllows to specify the effect for content areas with changes of formatting properties RevisionType.FORMAT_CHANGE Default value is RevisionTextEffect.NONE
revision_bars_colorAllows to specify the color to be used for side bars that identify document lines containing revised information. Default value is RevisionColor.RED.
revision_bars_positionGets or sets rendering position of revision bars. Default value is HorizontalAlignment.OUTSIDE.
revision_bars_widthGets or sets width of revision bars, points.
show_in_balloonsAllows to specify whether the revisions are rendered in the balloons. Default value is ShowInBalloons.NONE.
show_original_revisionAllows to specify whether the original text should be shown instead of revised one. Default value is False.
show_revision_barsAllows to specify whether revision bars should be rendered near lines containing revised content. Default value is True.
show_revision_marksAllow to specify whether revision text should be marked with special formatting markup. Default value is True.

Examples

Shows how to alter the appearance of revisions in a rendered output document.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

# Insert a revision, then change the color of all revisions to green.
builder.writeln("This is not a revision.")
doc.start_track_revisions("John Doe", datetime.now())
builder.writeln("This is a revision.")
doc.stop_track_revisions()
builder.writeln("This is not a revision.")

# Remove the bar that appears to the left of every revised line.
doc.layout_options.revision_options.inserted_text_color = aw.layout.RevisionColor.BRIGHT_GREEN
doc.layout_options.revision_options.show_revision_bars = False

doc.save(ARTIFACTS_DIR + "Document.layout_options_revisions.pdf")

See Also