public class RevisionOptions
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. 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."); // Remove the bar that appears to the left of every revised line. doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN); doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false); doc.save(getArtifactsDir() + "Document.LayoutOptionsRevisions.pdf");
Property Getters/Setters Summary | ||
---|---|---|
int | getCommentColor() | |
void | setCommentColor(intvalue) | |
Allows to specify the color to be used for comments.
Default value is |
||
int | getDeletedTextColor() | |
void | setDeletedTextColor(intvalue) | |
Allows to specify the color to be used for deleted content |
||
int | getDeletedTextEffect() | |
void | setDeletedTextEffect(intvalue) | |
Allows to specify the effect to be applied to the deleted content |
||
int | getInsertedTextColor() | |
void | setInsertedTextColor(intvalue) | |
Allows to specify the color to be used for inserted content |
||
int | getInsertedTextEffect() | |
void | setInsertedTextEffect(intvalue) | |
Allows to specify the effect to be applied to the inserted content |
||
int | getMeasurementUnit() | |
void | setMeasurementUnit(intvalue) | |
Allows to specify the measurement units for revision comments.
Default value is |
||
int | getMovedFromTextColor() | |
void | setMovedFromTextColor(intvalue) | |
Allows to specify the color to be used for areas where content was moved from |
||
int | getMovedFromTextEffect() | |
void | setMovedFromTextEffect(intvalue) | |
Allows to specify the effect to be applied to the areas where content was moved from |
||
int | getMovedToTextColor() | |
void | setMovedToTextColor(intvalue) | |
Allows to specify the color to be used for areas where content was moved to |
||
int | getMovedToTextEffect() | |
void | setMovedToTextEffect(intvalue) | |
Allows to specify the effect to be applied to the areas where content was moved to |
||
int | getRevisedPropertiesColor() | |
void | setRevisedPropertiesColor(intvalue) | |
Allows to specify the color to be used for content with changes of formatting properties |
||
int | getRevisedPropertiesEffect() | |
void | setRevisedPropertiesEffect(intvalue) | |
Allows to specify the effect for content areas with changes of formatting properties |
||
int | getRevisionBarsColor() | |
void | setRevisionBarsColor(intvalue) | |
Allows to specify the color to be used for side bars that identify document lines containing revised information.
Default value is |
||
int | getRevisionBarsPosition() | |
void | setRevisionBarsPosition(intvalue) | |
Gets or sets rendering position of revision bars.
Default value is |
||
float | getRevisionBarsWidth() | |
void | setRevisionBarsWidth(floatvalue) | |
Gets or sets width of revision bars, points. | ||
int | getShowInBalloons() | |
void | setShowInBalloons(intvalue) | |
Allows to specify whether the revisions are rendered in the balloons.
Default value is |
||
boolean | getShowOriginalRevision() | |
void | setShowOriginalRevision(booleanvalue) | |
Allows to specify whether the original text should be shown instead of revised one. Default value is False. | ||
boolean | getShowRevisionBars() | |
void | setShowRevisionBars(booleanvalue) | |
Allows to specify whether revision bars should be rendered near lines containing revised content. Default value is True. | ||
boolean | getShowRevisionMarks() | |
void | setShowRevisionMarks(booleanvalue) | |
Allow to specify whether revision text should be marked with special formatting markup. Default value is True. |
public int getCommentColor() / public void setCommentColor(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getDeletedTextColor() / public void setDeletedTextColor(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getDeletedTextEffect() / public void setDeletedTextEffect(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getInsertedTextColor() / public void setInsertedTextColor(int value)
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. 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."); // Remove the bar that appears to the left of every revised line. doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN); doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false); doc.save(getArtifactsDir() + "Document.LayoutOptionsRevisions.pdf");
public int getInsertedTextEffect() / public void setInsertedTextEffect(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getMeasurementUnit() / public void setMeasurementUnit(int value)
public int getMovedFromTextColor() / public void setMovedFromTextColor(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getMovedFromTextEffect() / public void setMovedFromTextEffect(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getMovedToTextColor() / public void setMovedToTextColor(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getMovedToTextEffect() / public void setMovedToTextEffect(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getRevisedPropertiesColor() / public void setRevisedPropertiesColor(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getRevisedPropertiesEffect() / public void setRevisedPropertiesEffect(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getRevisionBarsColor() / public void setRevisionBarsColor(int value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getRevisionBarsPosition() / public void setRevisionBarsPosition(int value)
public float getRevisionBarsWidth() / public void setRevisionBarsWidth(float value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public int getShowInBalloons() / public void setShowInBalloons(int value)
Example:
Shows how to display revisions in balloons.Document doc = new Document(getMyDir() + "Revisions.docx"); // By default, text that is a revision has a different color to differentiate it from the other non-revision text. // Set a revision option to show more details about each revision in a balloon on the page's right margin. doc.getLayoutOptions().getRevisionOptions().setShowInBalloons(ShowInBalloons.FORMAT_AND_DELETE); doc.save(getArtifactsDir() + "Revision.ShowRevisionBalloons.pdf");
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public boolean getShowOriginalRevision() / public void setShowOriginalRevision(boolean value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");
public boolean getShowRevisionBars() / public void setShowRevisionBars(boolean value)
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. 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."); // Remove the bar that appears to the left of every revised line. doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN); doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false); doc.save(getArtifactsDir() + "Document.LayoutOptionsRevisions.pdf");
public boolean getShowRevisionMarks() / public void setShowRevisionMarks(boolean value)
Example:
Shows how to modify the appearance of revisions.Document doc = new Document(getMyDir() + "Revisions.docx"); // Get the RevisionOptions object that controls the appearance of revisions. RevisionOptions revisionOptions = doc.getLayoutOptions().getRevisionOptions(); // Render insertion revisions in green and italic. revisionOptions.setInsertedTextColor(RevisionColor.GREEN); revisionOptions.setInsertedTextEffect(RevisionTextEffect.ITALIC); // Render deletion revisions in red and bold. revisionOptions.setDeletedTextColor(RevisionColor.RED); revisionOptions.setDeletedTextEffect(RevisionTextEffect.BOLD); // The same text will appear twice in a movement revision: // once at the departure point and once at the arrival destination. // Render the text at the moved-from revision yellow with a double strike through // and double-underlined blue at the moved-to revision. revisionOptions.setMovedFromTextColor(RevisionColor.YELLOW); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_STRIKE_THROUGH); revisionOptions.setMovedToTextColor(RevisionColor.BLUE); revisionOptions.setMovedFromTextEffect(RevisionTextEffect.DOUBLE_UNDERLINE); // Render format revisions in dark red and bold. revisionOptions.setRevisedPropertiesColor(RevisionColor.DARK_RED); revisionOptions.setRevisedPropertiesEffect(RevisionTextEffect.BOLD); // Place a thick dark blue bar on the left side of the page next to lines affected by revisions. revisionOptions.setRevisionBarsColor(RevisionColor.DARK_BLUE); revisionOptions.setRevisionBarsWidth(15.0f); // Show revision marks and original text. revisionOptions.setShowOriginalRevision(true); revisionOptions.setShowRevisionMarks(true); // Get movement, deletion, formatting revisions, and comments to show up in green balloons // on the right side of the page. revisionOptions.setShowInBalloons(ShowInBalloons.FORMAT); revisionOptions.setCommentColor(RevisionColor.BRIGHT_GREEN); // These features are only applicable to formats such as .pdf or .jpg. doc.save(getArtifactsDir() + "Revision.RevisionOptions.pdf");