public class RevisionColor
Example:
Document doc = new Document();
Assert.assertFalse(doc.getLayoutOptions().getShowHiddenText());
Assert.assertFalse(doc.getLayoutOptions().getShowParagraphMarks());
// The appearance of revisions can be controlled from the layout options property
doc.startTrackRevisions("John Doe", new Date());
doc.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN);
doc.getLayoutOptions().getRevisionOptions().setShowRevisionBars(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.getFont().setHidden(true);
builder.writeln(
"This text is hidden. It will only show up in the output if we allow it to via doc.LayoutOptions.");
doc.getLayoutOptions().setShowHiddenText(true);
doc.save(getArtifactsDir() + "Document.LayoutOptions.pdf");
Field Summary | ||
---|---|---|
static final int | AUTO | |
Default.
|
||
static final int | BLACK | |
Represents 000000 color.
|
||
static final int | BLUE | |
Represents 2e97d3 color.
|
||
static final int | BRIGHT_GREEN | |
Represents 84a35b color.
|
||
static final int | DARK_BLUE | |
Represents 376e96 color.
|
||
static final int | DARK_RED | |
Represents 881824 color.
|
||
static final int | DARK_YELLOW | |
Represents e09a2b color.
|
||
static final int | GRAY_25 | |
Represents a0a3a9 color.
|
||
static final int | GRAY_50 | |
Represents 50565e color.
|
||
static final int | GREEN | |
Represents 2c6234 color.
|
||
static final int | PINK | |
Represents ce338f color.
|
||
static final int | RED | |
Represents b5082e color.
|
||
static final int | TEAL | |
Represents 1b9cab color.
|
||
static final int | TURQUOISE | |
Represents 3eafc2 color.
|
||
static final int | VIOLET | |
Represents 633277 color.
|
||
static final int | WHITE | |
Represents ffffff color.
|
||
static final int | YELLOW | |
Represents fad272 color.
|
||
static final int | NO_HIGHLIGHT | |
No color is used to highlight revision changes.
|
||
static final int | BY_AUTHOR | |
Revisions of each author receive their own color for highlighting from a predfined set of hi-contrast colors.
|
public static final int AUTO
public static final int BLACK
public static final int BLUE
public static final int BRIGHT_GREEN
public static final int DARK_BLUE
public static final int DARK_RED
public static final int DARK_YELLOW
public static final int GRAY_25
public static final int GRAY_50
public static final int GREEN
public static final int PINK
public static final int RED
public static final int TEAL
public static final int TURQUOISE
public static final int VIOLET
public static final int WHITE
public static final int YELLOW
public static final int NO_HIGHLIGHT
public static final int BY_AUTHOR