PageAreaRedaction

Inheritance: java.lang.Object, com.groupdocs.redaction.Redaction, com.groupdocs.redaction.redactions.TextRedaction, com.groupdocs.redaction.redactions.RegexRedaction

public class PageAreaRedaction extends RegexRedaction

Represents a complex textual redaction that affects text, images and annotations in an area of the page.


Learn more

Constructors

Constructor Description
PageAreaRedaction(Pattern regex, ReplacementOptions options) Initializes a new instance of PageAreaRedaction class.
PageAreaRedaction(Pattern regex, ReplacementOptions options, RegionReplacementOptions imageOptions) Initializes a new instance of PageAreaRedaction class.

Methods

Method Description
getImageOptions() Gets the RegionReplacementOptions options with color and area parameters.
applyTo(DocumentFormatInstance formatInstance) Applies the redaction to a given format instance.

PageAreaRedaction(Pattern regex, ReplacementOptions options)

public PageAreaRedaction(Pattern regex, ReplacementOptions options)

Initializes a new instance of PageAreaRedaction class.

Parameters:

Parameter Type Description
regex java.util.regex.Pattern Regular expression to search and replace
options ReplacementOptions Replacement options (textual, color)

PageAreaRedaction(Pattern regex, ReplacementOptions options, RegionReplacementOptions imageOptions)

public PageAreaRedaction(Pattern regex, ReplacementOptions options, RegionReplacementOptions imageOptions)

Initializes a new instance of PageAreaRedaction class.

Parameters:

Parameter Type Description
regex java.util.regex.Pattern Regular expression to search and replace
options ReplacementOptions Replacement options (textual, color)
imageOptions RegionReplacementOptions Replacement options (image area)

getImageOptions()

public final RegionReplacementOptions getImageOptions()

Gets the RegionReplacementOptions options with color and area parameters.

Returns: RegionReplacementOptions - The RegionReplacementOptions options with color and area parameters.

applyTo(DocumentFormatInstance formatInstance)

public RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)

Applies the redaction to a given format instance.

Parameters:

Parameter Type Description
formatInstance DocumentFormatInstance An instance of a document to apply redaction

Returns: RedactorLogEntry - Status of the redaction: success/failure and error message if any