com.aspose.words

Class RevisionOptions

  • java.lang.Object
    • com.aspose.words.RevisionOptions
  • All Implemented Interfaces:
    java.lang.Cloneable
    public class RevisionOptions 
    extends java.lang.Object

Allows to control how document revisions are handled during layout process.

Example:

Shows how to alter the appearance of revisions in a rendered output document.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a revision, then change the color of all revisions to green,
// and also remove the bar that appears to the left of every revised line.
builder.writeln("This is not a revision.");
doc.startTrackRevisions("John Doe", new Date());
builder.writeln("This is a revision.");
doc.stopTrackRevisions();
builder.writeln("This is not a revision.");

doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN);
doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false);

doc.save(getArtifactsDir() + "Document.LayoutOptionsRevisions.pdf");

Property Getters/Setters Summary
intgetCommentColor()
void
setCommentColor(intvalue)
           Allows to specify the color to be used for comments. Default value is RevisionColor.RED. The value of the property is RevisionColor integer constant.
intgetDeletedTextColor()
void
           Allows to specify the color to be used for deleted content RevisionType.DELETION. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
intgetDeletedTextEffect()
void
           Allows to specify the effect to be applied to the deleted content RevisionType.DELETION. Default value is RevisionTextEffect.STRIKE_THROUGHThe value of the property is RevisionTextEffect integer constant.
intgetInsertedTextColor()
void
           Allows to specify the color to be used for inserted content RevisionType.INSERTION. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
intgetInsertedTextEffect()
void
           Allows to specify the effect to be applied to the inserted content RevisionType.INSERTION. Default value is RevisionTextEffect.UNDERLINE. The value of the property is RevisionTextEffect integer constant.
intgetMeasurementUnit()
void
           Allows to specify the measurement units for revision comments. Default value is MeasurementUnits.CENTIMETERSThe value of the property is MeasurementUnits integer constant.
intgetMovedFromTextColor()
void
           Allows to specify the color to be used for areas where content was moved from RevisionType.MOVING. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
intgetMovedFromTextEffect()
void
           Allows to specify the effect to be applied to the areas where content was moved from RevisionType.MOVING. Default value is RevisionTextEffect.DOUBLE_STRIKE_THROUGHThe value of the property is RevisionTextEffect integer constant.
intgetMovedToTextColor()
void
           Allows to specify the color to be used for areas where content was moved to RevisionType.MOVING. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
intgetMovedToTextEffect()
void
           Allows to specify the effect to be applied to the areas where content was moved to RevisionType.MOVING. Default value is RevisionTextEffect.DOUBLE_UNDERLINEThe value of the property is RevisionTextEffect integer constant.
intgetRevisedPropertiesColor()
void
           Allows to specify the color to be used for content with changes of formatting properties RevisionType.FORMAT_CHANGE Default value is RevisionColor.NO_HIGHLIGHT. The value of the property is RevisionColor integer constant.
intgetRevisedPropertiesEffect()
void
           Allows to specify the effect for content areas with changes of formatting properties RevisionType.FORMAT_CHANGE Default value is RevisionTextEffect.NONEThe value of the property is RevisionTextEffect integer constant.
intgetRevisionBarsColor()
void
           Allows to specify the color to be used for side bars that identify document lines containing revised information. Default value is RevisionColor.RED. The value of the property is RevisionColor integer constant.
intgetRevisionBarsPosition()
void
           Gets or sets rendering position of revision bars. Default value is HorizontalAlignment.OUTSIDE. The value of the property is HorizontalAlignment integer constant.
floatgetRevisionBarsWidth()
void
           Gets or sets width of revision bars, points.
intgetShowInBalloons()
void
           Allows to specify whether the revisions are rendered in the balloons. Default value is ShowInBalloons.NONEThe value of the property is ShowInBalloons integer constant.
booleangetShowOriginalRevision()
void
           Allows to specify whether the original text should be shown instead of revised one. Default value is False.
booleangetShowRevisionBars()
void
setShowRevisionBars(booleanvalue)
           Allows to specify whether revision bars should be rendered near lines containing revised content. Default value is True.
booleangetShowRevisionMarks()
void
setShowRevisionMarks(booleanvalue)
           Allow to specify whether revision text should be marked with special formatting markup. Default value is True.
 

    • Property Getters/Setters Detail

      • getCommentColor/setCommentColor

        public int getCommentColor() / public void setCommentColor(int value)
        
        Allows to specify the color to be used for comments. Default value is RevisionColor.RED. The value of the property is RevisionColor integer constant. If set this property to RevisionColor.BY_AUTHOR or RevisionColor.NO_HIGHLIGHT values, as the result this property will be set to default color.
      • getDeletedTextColor/setDeletedTextColor

        public int getDeletedTextColor() / public void setDeletedTextColor(int value)
        
        Allows to specify the color to be used for deleted content RevisionType.DELETION. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
      • getInsertedTextColor/setInsertedTextColor

        public int getInsertedTextColor() / public void setInsertedTextColor(int value)
        
        Allows to specify the color to be used for inserted content RevisionType.INSERTION. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.

        Example:

        Shows how to alter the appearance of revisions in a rendered output document.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        // Insert a revision, then change the color of all revisions to green,
        // and also remove the bar that appears to the left of every revised line.
        builder.writeln("This is not a revision.");
        doc.startTrackRevisions("John Doe", new Date());
        builder.writeln("This is a revision.");
        doc.stopTrackRevisions();
        builder.writeln("This is not a revision.");
        
        doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN);
        doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false);
        
        doc.save(getArtifactsDir() + "Document.LayoutOptionsRevisions.pdf");
      • getMeasurementUnit/setMeasurementUnit

        public int getMeasurementUnit() / public void setMeasurementUnit(int value)
        
        Allows to specify the measurement units for revision comments. Default value is MeasurementUnits.CENTIMETERSThe value of the property is MeasurementUnits integer constant.
      • getMovedFromTextColor/setMovedFromTextColor

        public int getMovedFromTextColor() / public void setMovedFromTextColor(int value)
        
        Allows to specify the color to be used for areas where content was moved from RevisionType.MOVING. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
      • getMovedToTextColor/setMovedToTextColor

        public int getMovedToTextColor() / public void setMovedToTextColor(int value)
        
        Allows to specify the color to be used for areas where content was moved to RevisionType.MOVING. Default value is RevisionColor.BY_AUTHOR. The value of the property is RevisionColor integer constant.
      • getRevisedPropertiesColor/setRevisedPropertiesColor

        public int getRevisedPropertiesColor() / public void setRevisedPropertiesColor(int value)
        
        Allows to specify the color to be used for content with changes of formatting properties RevisionType.FORMAT_CHANGE Default value is RevisionColor.NO_HIGHLIGHT. The value of the property is RevisionColor integer constant.
      • getRevisionBarsColor/setRevisionBarsColor

        public int getRevisionBarsColor() / public void setRevisionBarsColor(int value)
        
        Allows to specify the color to be used for side bars that identify document lines containing revised information. Default value is RevisionColor.RED. The value of the property is RevisionColor integer constant. Setting this property to RevisionColor.BY_AUTHOR or RevisionColor.NO_HIGHLIGHT values will result in hiding revision bars from the layout.
      • getRevisionBarsWidth/setRevisionBarsWidth

        public float getRevisionBarsWidth() / public void setRevisionBarsWidth(float value)
        
        Gets or sets width of revision bars, points.
      • getShowInBalloons/setShowInBalloons

        public int getShowInBalloons() / public void setShowInBalloons(int value)
        
        Allows to specify whether the revisions are rendered in the balloons. Default value is ShowInBalloons.NONEThe value of the property is ShowInBalloons integer constant.
      • getShowOriginalRevision/setShowOriginalRevision

        public boolean getShowOriginalRevision() / public void setShowOriginalRevision(boolean value)
        
        Allows to specify whether the original text should be shown instead of revised one. Default value is False.
      • getShowRevisionBars/setShowRevisionBars

        public boolean getShowRevisionBars() / public void setShowRevisionBars(boolean value)
        
        Allows to specify whether revision bars should be rendered near lines containing revised content. Default value is True.

        Example:

        Shows how to alter the appearance of revisions in a rendered output document.
        Document doc = new Document();
        DocumentBuilder builder = new DocumentBuilder(doc);
        
        // Insert a revision, then change the color of all revisions to green,
        // and also remove the bar that appears to the left of every revised line.
        builder.writeln("This is not a revision.");
        doc.startTrackRevisions("John Doe", new Date());
        builder.writeln("This is a revision.");
        doc.stopTrackRevisions();
        builder.writeln("This is not a revision.");
        
        doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN);
        doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false);
        
        doc.save(getArtifactsDir() + "Document.LayoutOptionsRevisions.pdf");
      • getShowRevisionMarks/setShowRevisionMarks

        public boolean getShowRevisionMarks() / public void setShowRevisionMarks(boolean value)
        
        Allow to specify whether revision text should be marked with special formatting markup. Default value is True.