RedactionAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation

public final class RedactionAnnotation extends MarkupAnnotation

Represents Redact annotation.

Constructors

ConstructorDescription
RedactionAnnotation(IDocument document)Constructor for RedactionAnnotation.
RedactionAnnotation(Page page, Rectangle rect)Constructor for RedactAnnotation.

Methods

MethodDescription
accept(AnnotationSelector visitor)Accepts visitor object to process the annotation.
getQuadPoint()An array of 8xN numbers specifying the coordinates of content region that is intended to be removed.
setQuadPoint(Point[] value)An array of 8xN numbers specifying the coordinates of content region that is intended to be removed.
getQuadPoints()Gets an array of points specifying the coordinates of n quadrilaterals.
setQuadPoints(Point[] value)Sets an array of points specifying the coordinates of n quadrilaterals.
getDefaultAppearance()Gets or sets the default appearance string to be used in formatting the text.
setDefaultAppearance(String value)Gets or sets the default appearance string to be used in formatting the text.
getFillColor()Gets color to fill annotation.
setFillColor(Color value)Sets color to fill annotation.
getBorderColor()Gets color of border which is drawn when redaction is not active.
setBorderColor(Color value)Sets color of border which is drawn when redaction is not active.
getOverlayText()Gets text to print on redact annotation.
setOverlayText(String value)Sets text to print on redact annotation.
getFontSize()Gets font size for OverlayText.
setFontSize(float fontSize)Sets font size for OverlayText.
isRepeat()If true overlay text will be repated on the annotation.
setRepeat(boolean value)If true overlay text will be repated on the annotation.
getTextAlignment()Gets alignment of Overlay Text.
setTextAlignment(HorizontalAlignment value)Sets alignment of Overlay Text.
flatten()Flattens annotation i.e.
redact()Flattens annotation and redacts page contents (i.e.
redactExact()Flattens annotation and redacts page contents (i.e.
getAnnotationType()Gets type of annotation.

RedactionAnnotation(IDocument document)

public RedactionAnnotation(IDocument document)

Constructor for RedactionAnnotation. For using in Generator.

Parameters:

ParameterTypeDescription
documentIDocumentDocument where new annotation will be created.

RedactionAnnotation(Page page, Rectangle rect)

public RedactionAnnotation(Page page, Rectangle rect)

Constructor for RedactAnnotation.

Parameters:

ParameterTypeDescription
pagePagePage where annotation will be placed.
rectRectangleAnnotation position on the page.

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object to process the annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.

getQuadPoint()

public Point[] getQuadPoint()

An array of 8xN numbers specifying the coordinates of content region that is intended to be removed.

Returns: com.aspose.pdf.Point[] - array of point

setQuadPoint(Point[] value)

public void setQuadPoint(Point[] value)

An array of 8xN numbers specifying the coordinates of content region that is intended to be removed.

Parameters:

ParameterTypeDescription
valuePoint[]array of point

getQuadPoints()

public Point[] getQuadPoints()

Gets an array of points specifying the coordinates of n quadrilaterals. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation.

Returns: com.aspose.pdf.Point[] - array of Point value

setQuadPoints(Point[] value)

public void setQuadPoints(Point[] value)

Sets an array of points specifying the coordinates of n quadrilaterals. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation.

Parameters:

ParameterTypeDescription
valuePoint[]array of Point value

getDefaultAppearance()

public final String getDefaultAppearance()

Gets or sets the default appearance string to be used in formatting the text.

Returns: java.lang.String - String value

setDefaultAppearance(String value)

public final void setDefaultAppearance(String value)

Gets or sets the default appearance string to be used in formatting the text.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

getFillColor()

public Color getFillColor()

Gets color to fill annotation.

Returns: Color - color value

setFillColor(Color value)

public void setFillColor(Color value)

Sets color to fill annotation.

Parameters:

ParameterTypeDescription
valueColorcolor value

getBorderColor()

public Color getBorderColor()

Gets color of border which is drawn when redaction is not active.

Returns: Color - Color value

setBorderColor(Color value)

public void setBorderColor(Color value)

Sets color of border which is drawn when redaction is not active.

Parameters:

ParameterTypeDescription
valueColorColor value

getOverlayText()

public String getOverlayText()

Gets text to print on redact annotation.

Returns: java.lang.String - string value

setOverlayText(String value)

public void setOverlayText(String value)

Sets text to print on redact annotation.

Parameters:

ParameterTypeDescription
valuejava.lang.Stringstring object

getFontSize()

public final float getFontSize()

Gets font size for OverlayText.

Returns: float - int value

setFontSize(float fontSize)

public final void setFontSize(float fontSize)

Sets font size for OverlayText.

Default value is 10.

Parameters:

ParameterTypeDescription
fontSizefloatint value

isRepeat()

public boolean isRepeat()

If true overlay text will be repated on the annotation.

Returns: boolean - boolean value

setRepeat(boolean value)

public void setRepeat(boolean value)

If true overlay text will be repated on the annotation.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getTextAlignment()

public HorizontalAlignment getTextAlignment()

Gets alignment of Overlay Text.

Returns: HorizontalAlignment - HorizontalAlignment value

setTextAlignment(HorizontalAlignment value)

public void setTextAlignment(HorizontalAlignment value)

Sets alignment of Overlay Text.

Parameters:

ParameterTypeDescription
valueHorizontalAlignmentHorizontalAlignment value

flatten()

public void flatten()

Flattens annotation i.e. removes annotation and adds its content

redact()

public void redact()

Flattens annotation and redacts page contents (i.e. removes text and image content under redacted annotation)

redactExact()

public void redactExact()

Flattens annotation and redacts page contents (i.e. removes text and image content exactly under redacted annotation)

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - AnnotationType element