com.groupdocs.watermark.legacy

Interfaces

Classes

Exceptions

com.groupdocs.watermark.legacy

Class TextFormattingSearchCriteria


  • Deprecated.

    @Deprecated
    public class TextFormattingSearchCriteria
    extends SearchCriteria

    Represents criteria allowing filtering by text formatting.

    This example demonstrates how to remove possible watermarks with a particular text formatting (regardless of document type).

    String inputFolder = "D:\\docs\\input\\";
     String outputFolder = "D:\\docs\\output\\";
     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);
     File[] files = new File(inputFolder).listFiles();
     for (File file : files)
     {
         if (file.isFile())
         {
             Document doc = Document.load(file.getAbsolutePath());                   
             PossibleWatermarkCollection watermarks = doc.findWatermarks(criteria);
             watermarks.clear();
             doc.save(outputFolder + file.getName()); 
         }
     }
     
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      ColorRange getBackgroundColorRange()
      Deprecated. 
      Gets the range of colors which are used to filter watermarks by text background color.
      Boolean getFontBold()
      Deprecated. 
      Gets a value indicating whether the font used in watermark text formatting is bold.
      Boolean getFontItalic()
      Deprecated. 
      Gets a value indicating whether the font used in watermark text formatting is italic.
      String getFontName()
      Deprecated. 
      Gets the name of the font which is used in possible watermark text formatting.
      Boolean getFontStrikeout()
      Deprecated. 
      Gets a value indicating whether the font used in watermark text formatting is strikeout.
      Boolean getFontUnderline()
      Deprecated. 
      Gets a value indicating whether the font used in watermark text formatting is underline.
      ColorRange getForegroundColorRange()
      Deprecated. 
      Gets the range of colors which are used to filter watermarks by text foreground color.
      float getMaxFontSize()
      Deprecated. 
      Gets the ending value of the font size.
      float getMinFontSize()
      Deprecated. 
      Gets the starting value of the font size.
      void setBackgroundColorRange(ColorRange value)
      Deprecated. 
      Sets the range of colors which are used to filter watermarks by text background color.
      void setFontBold(Boolean value)
      Deprecated. 
      Sets a value indicating whether the font used in watermark text formatting is bold.
      void setFontItalic(Boolean value)
      Deprecated. 
      Sets a value indicating whether the font used in watermark text formatting is italic.
      void setFontName(String value)
      Deprecated. 
      Sets the name of the font which is used in possible watermark text formatting.
      void setFontStrikeout(Boolean value)
      Deprecated. 
      Sets a value indicating whether the font used in watermark text formatting is strikeout.
      void setFontUnderline(Boolean value)
      Deprecated. 
      Sets a value indicating whether the font used in watermark text formatting is underline.
      void setForegroundColorRange(ColorRange value)
      Deprecated. 
      Sets the range of colors which are used to filter watermarks by text foreground color.
      void setMaxFontSize(float value)
      Deprecated. 
      Sets the ending value of the font size.
      void setMinFontSize(float value)
      Deprecated. 
      Sets the starting value of the font size.
    • Constructor Detail

      • TextFormattingSearchCriteria

        public TextFormattingSearchCriteria()
        Deprecated. 
    • Method Detail

      • getForegroundColorRange

        public final ColorRange getForegroundColorRange()
        Deprecated. 

        Gets the range of colors which are used to filter watermarks by text foreground color.

        Returns:
        The range of colors which are used to filter watermarks by text foreground color.
      • setForegroundColorRange

        public final void setForegroundColorRange(ColorRange value)
        Deprecated. 

        Sets the range of colors which are used to filter watermarks by text foreground color.

        Parameters:
        value - The range of colors which are used to filter watermarks by text foreground color.
      • getBackgroundColorRange

        public final ColorRange getBackgroundColorRange()
        Deprecated. 

        Gets the range of colors which are used to filter watermarks by text background color.

        Returns:
        The range of colors which are used to filter watermarks by text background color.
      • setBackgroundColorRange

        public final void setBackgroundColorRange(ColorRange value)
        Deprecated. 

        Sets the range of colors which are used to filter watermarks by text background color.

        Parameters:
        value - The range of colors which are used to filter watermarks by text background color.
      • getFontName

        public final String getFontName()
        Deprecated. 

        Gets the name of the font which is used in possible watermark text formatting.

        Returns:
        The default value is null, which means that the filter is not applied.
      • setFontName

        public final void setFontName(String value)
        Deprecated. 

        Sets the name of the font which is used in possible watermark text formatting.

        Parameters:
        value - The default value is null, which means that the filter is not applied.
      • getMinFontSize

        public final float getMinFontSize()
        Deprecated. 

        Gets the starting value of the font size.

        Returns:
        The starting value of the font size.
      • setMinFontSize

        public final void setMinFontSize(float value)
        Deprecated. 

        Sets the starting value of the font size.

        Parameters:
        value - The starting value of the font size.
      • getMaxFontSize

        public final float getMaxFontSize()
        Deprecated. 

        Gets the ending value of the font size.

        Returns:
        The ending value of the font size.
      • setMaxFontSize

        public final void setMaxFontSize(float value)
        Deprecated. 

        Sets the ending value of the font size.

        Parameters:
        value - The ending value of the font size.
      • getFontBold

        public final Boolean getFontBold()
        Deprecated. 

        Gets a value indicating whether the font used in watermark text formatting is bold.

        Returns:
        The default value is null, which means that the filter is not applied.
      • setFontBold

        public final void setFontBold(Boolean value)
        Deprecated. 

        Sets a value indicating whether the font used in watermark text formatting is bold.

        Parameters:
        value - The default value is null, which means that the filter is not applied.
      • getFontItalic

        public final Boolean getFontItalic()
        Deprecated. 

        Gets a value indicating whether the font used in watermark text formatting is italic.

        Returns:
        The default value is null, which means that the filter is not applied.
      • setFontItalic

        public final void setFontItalic(Boolean value)
        Deprecated. 

        Sets a value indicating whether the font used in watermark text formatting is italic.

        Parameters:
        value - The default value is null, which means that the filter is not applied.
      • getFontUnderline

        public final Boolean getFontUnderline()
        Deprecated. 

        Gets a value indicating whether the font used in watermark text formatting is underline.

        Returns:
        The default value is null, which means that the filter is not applied.
      • setFontUnderline

        public final void setFontUnderline(Boolean value)
        Deprecated. 

        Sets a value indicating whether the font used in watermark text formatting is underline.

        Parameters:
        value - The default value is null, which means that the filter is not applied.
      • getFontStrikeout

        public final Boolean getFontStrikeout()
        Deprecated. 

        Gets a value indicating whether the font used in watermark text formatting is strikeout.

        Returns:
        The default value is null, which means that the filter is not applied.
      • setFontStrikeout

        public final void setFontStrikeout(Boolean value)
        Deprecated. 

        Sets a value indicating whether the font used in watermark text formatting is strikeout.

        Parameters:
        value - The default value is null, which means that the filter is not applied.