public class RegexBasedCleanupStrategy extends com.itextpdf.kernel.pdf.canvas.parser.listener.RegexBasedLocationExtractionStrategy implements ICleanupStrategy
Constructor and Description |
---|
RegexBasedCleanupStrategy(Pattern pattern)
Creates an object of regular expression based cleanup strategy.
|
RegexBasedCleanupStrategy(String regex)
Creates an object of regular expression based cleanup strategy.
|
Modifier and Type | Method and Description |
---|---|
com.itextpdf.kernel.colors.Color |
getRedactionColor(com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation location)
Get the color in which redaction is to take place
|
ICleanupStrategy |
reset()
Returns an ICleanupStrategy object which is set to this regular pattern and redaction color.
|
RegexBasedCleanupStrategy |
setRedactionColor(com.itextpdf.kernel.colors.Color color)
Sets the color in which redaction is to take place.
|
eventOccurred, getResultantLocations, getSupportedEvents, toCRI, toRectangles
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public RegexBasedCleanupStrategy(String regex)
regex
- regular expression on which cleanup strategy will be based
public com.itextpdf.kernel.colors.Color getRedactionColor(com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation location)
getRedactionColor
in interface ICleanupStrategy
location
- where to get the redaction color from
Color
public RegexBasedCleanupStrategy setRedactionColor(com.itextpdf.kernel.colors.Color color)
color
- the color in which redaction is to take place
strategy
public ICleanupStrategy reset()
ICleanupStrategy
object which is set to this regular pattern and redaction color.
reset
in interface ICleanupStrategy
cleanup strategy
Copyright © 1998–2022 iText Group NV. All rights reserved.