public class TextFormattingSearchCriteria extends SearchCriteria
Learn more:
The following example demonstrates how to remove possible watermarks with a particular text formatting (regardless of document type).
Watermarker watermarker = new Watermarker("D:\\test.doc"); TextFormattingSearchCriteria criteria = new TextFormattingSearchCriteria(); criteria.setForegroundColorRange(new ColorRange()); criteria.getForegroundColorRange().setMinHue(-5); criteria.getForegroundColorRange().setMaxHue(10); criteria.getForegroundColorRange().setMinBrightness(0.01f); criteria.getForegroundColorRange().setMaxBrightness(0.99f); criteria.setBackgroundColorRange(new ColorRange()); criteria.getBackgroundColorRange().setEmpty(true); criteria.setFontName("Arial"); criteria.setMinFontSize(19); criteria.setMaxFontSize(42); criteria.setFontBold(true); PossibleWatermarkCollection watermarks = watermarker.search(criteria); watermarks.clear(); watermarker.save("C:\\modified_test.some_ext"); watermarker.close();
Constructor and Description |
---|
TextFormattingSearchCriteria()
Initializes a new instance of the
class. |
Modifier and Type | Method and Description |
---|---|
ColorRange |
getBackgroundColorRange()
Gets the range of colors which are used to filter watermarks by text background color.
|
Boolean |
getFontBold()
Gets a value indicating whether the font used in watermark text formatting is bold.
|
Boolean |
getFontItalic()
Gets a value indicating whether the font used in watermark text formatting is italic.
|
String |
getFontName()
Gets the name of the font which is used in possible watermark text formatting.
|
Boolean |
getFontStrikeout()
Gets a value indicating whether the font used in watermark text formatting is strikeout.
|
Boolean |
getFontUnderline()
Gets a value indicating whether the font used in watermark text formatting is underline.
|
ColorRange |
getForegroundColorRange()
Gets the range of colors which are used to filter watermarks by text foreground color.
|
float |
getMaxFontSize()
Gets the ending value of the font size.
|
float |
getMinFontSize()
Gets the starting value of the font size.
|
void |
setBackgroundColorRange(ColorRange value)
Sets the range of colors which are used to filter watermarks by text background color.
|
void |
setFontBold(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is bold.
|
void |
setFontItalic(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is italic.
|
void |
setFontName(String value)
Sets the name of the font which is used in possible watermark text formatting.
|
void |
setFontStrikeout(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is strikeout.
|
void |
setFontUnderline(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is underline.
|
void |
setForegroundColorRange(ColorRange value)
Sets the range of colors which are used to filter watermarks by text foreground color.
|
void |
setMaxFontSize(float value)
Sets the ending value of the font size.
|
void |
setMinFontSize(float value)
Sets the starting value of the font size.
|
and, not, or
public TextFormattingSearchCriteria()
TextFormattingSearchCriteria
class.public final ColorRange getForegroundColorRange()
Gets the range of colors which are used to filter watermarks by text foreground color.
public final void setForegroundColorRange(ColorRange value)
Sets the range of colors which are used to filter watermarks by text foreground color.
value
- The range of colors which are used to filter watermarks by text foreground color.public final ColorRange getBackgroundColorRange()
Gets the range of colors which are used to filter watermarks by text background color.
public final void setBackgroundColorRange(ColorRange value)
Sets the range of colors which are used to filter watermarks by text background color.
value
- The range of colors which are used to filter watermarks by text background color.public final String getFontName()
Gets the name of the font which is used in possible watermark text formatting.
public final void setFontName(String value)
Sets the name of the font which is used in possible watermark text formatting.
value
- The default value is null, which means that the filter is not applied.public final float getMinFontSize()
Gets the starting value of the font size.
public final void setMinFontSize(float value)
Sets the starting value of the font size.
value
- The starting value of the font size.public final float getMaxFontSize()
Gets the ending value of the font size.
public final void setMaxFontSize(float value)
Sets the ending value of the font size.
value
- The ending value of the font size.public final Boolean getFontBold()
Gets a value indicating whether the font used in watermark text formatting is bold.
public final void setFontBold(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is bold.
value
- The default value is null, which means that the filter is not applied.public final Boolean getFontItalic()
Gets a value indicating whether the font used in watermark text formatting is italic.
public final void setFontItalic(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is italic.
value
- The default value is null, which means that the filter is not applied.public final Boolean getFontUnderline()
Gets a value indicating whether the font used in watermark text formatting is underline.
public final void setFontUnderline(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is underline.
value
- The default value is null, which means that the filter is not applied.public final Boolean getFontStrikeout()
Gets a value indicating whether the font used in watermark text formatting is strikeout.
public final void setFontStrikeout(Boolean value)
Sets a value indicating whether the font used in watermark text formatting is strikeout.
value
- The default value is null, which means that the filter is not applied.