com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class TextSearchOptions



  • public final class TextSearchOptions
    extends TextOptions

    Represents text search options

    • Constructor Summary

      Constructors 
      Constructor and Description
      TextSearchOptions(boolean isRegularExpressionUsed)
      Initializes new instance of the TextSearchOptions object.
      TextSearchOptions(Rectangle rectangle)
      Initializes new instance of the TextSearchOptions object.
      TextSearchOptions(Rectangle rectangle, boolean isRegularExpressionUsed)
      Initializes new instance of the TextSearchOptions object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean getLimitToPageBounds()
      Gets indication that text is searched within the page bounds.
      boolean getLogTextExtractionErrors()
      Gets or sets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged.
      Rectangle getRectangle()
      Gets rectangle that bounds the searched text.
      boolean getSearchForTextRelatedGraphics()
      Gets or sets value that permits searching for text related graphics (underlining, background etc.) during text search.
      boolean getUseFontEngineEncoding()
      Gets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value)
      static boolean isDotallMode()
      In dotall mode, the expression .
      boolean isIgnoreShadowText()
      Gets or sets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value)
      boolean isRegularExpressionUsed()
      Indicated that regular expression is used or not
      static void setDotallMode(boolean dotallMode)
      Enables dotall mode.
      void setIgnoreShadowText(boolean value)
      Gets or sets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value)
      void setLimitToPageBounds(boolean value)
      Sets indication that text is searched within the page bounds.
      void setLogTextExtractionErrors(boolean value)
      Gets or sets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged.
      void setRectangle(Rectangle value)
      Sets rectangle that bounds the searched text.
      void setRegularExpressionUsed(boolean value)
      Indicated that regular expression is used or not
      void setSearchForTextRelatedGraphics(boolean value)
      Gets or sets value that permits searching for text related graphics (underlining, background etc.) during text search.
      void setUseFontEngineEncoding(boolean value)
      Sets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value)
    • Constructor Detail

      • TextSearchOptions

        public TextSearchOptions(boolean isRegularExpressionUsed)

        Initializes new instance of the TextSearchOptions object. Specifies regular expression usage mode.

        Parameters:
        isRegularExpressionUsed - Value that indicates that regularexpression is used.
      • TextSearchOptions

        public TextSearchOptions(Rectangle rectangle)

        Initializes new instance of the TextSearchOptions object. Specifies rectangle that delimits the searched text.

        Parameters:
        rectangle - Rectangle that includes the extracted text.
      • TextSearchOptions

        public TextSearchOptions(Rectangle rectangle,
                                 boolean isRegularExpressionUsed)

        Initializes new instance of the TextSearchOptions object. Specifies rectangle that delimits the searched text and regular expression usage mode.

        Parameters:
        rectangle - Rectangle that includes the extracted text.
        isRegularExpressionUsed - Value that indicates that regular expression is used.
    • Method Detail

      • setDotallMode

        public static void setDotallMode(boolean dotallMode)
        Enables dotall mode.

        In dotall mode, the expression . matches any character, including a line terminator. By default this expression does not match line terminators.

        Parameters:
        dotallMode - boolean value
      • isDotallMode

        public static boolean isDotallMode()

        In dotall mode, the expression . matches any character, including a line terminator. By default this expression does not match line terminators.

        Returns:
        boolean value
      • isRegularExpressionUsed

        public boolean isRegularExpressionUsed()

        Indicated that regular expression is used or not

        Returns:
        boolean value
      • setRegularExpressionUsed

        public void setRegularExpressionUsed(boolean value)

        Indicated that regular expression is used or not

        Parameters:
        value - boolean value
      • getLimitToPageBounds

        public boolean getLimitToPageBounds()

        Gets indication that text is searched within the page bounds.

        Returns:
        boolean value
      • setLimitToPageBounds

        public void setLimitToPageBounds(boolean value)

        Sets indication that text is searched within the page bounds.

        Parameters:
        value - boolean value
      • getRectangle

        public Rectangle getRectangle()

        Gets rectangle that bounds the searched text. The property may be used in case it is required to delimit text extraction or text replace region.

        Returns:
        Rectangle value
      • setRectangle

        public void setRectangle(Rectangle value)

        Sets rectangle that bounds the searched text. The property may be used in case it is required to delimit text extraction or text replace region.

        Parameters:
        value - Rectangle object
      • getUseFontEngineEncoding

        public boolean getUseFontEngineEncoding()

        Gets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value)

        Returns:
        boolean value
      • setUseFontEngineEncoding

        public void setUseFontEngineEncoding(boolean value)

        Sets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value)

        Parameters:
        value - boolean value
      • isIgnoreShadowText

        public boolean isIgnoreShadowText()

        Gets or sets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value)

        Returns:
        boolean value
      • setIgnoreShadowText

        public void setIgnoreShadowText(boolean value)

        Gets or sets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value)

        Parameters:
        value - boolean value
      • getLogTextExtractionErrors

        public boolean getLogTextExtractionErrors()

        Gets or sets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged. It may decrease performance. false (default) - no error loging.

        Returns:
        boolean value
      • setLogTextExtractionErrors

        public void setLogTextExtractionErrors(boolean value)

        Gets or sets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged. It may decrease performance. false (default) - no error loging.

        Parameters:
        value - boolean value
      • getSearchForTextRelatedGraphics

        public final boolean getSearchForTextRelatedGraphics()

        Gets or sets value that permits searching for text related graphics (underlining, background etc.) during text search. false - graphic elements that may present in source document will be ignored (default value). true - searching for text related graphics will be performed. It may decrease performance of text search and edit. It also may change graphical elements that look like text related.

        Returns:
        boolean value
      • setSearchForTextRelatedGraphics

        public final void setSearchForTextRelatedGraphics(boolean value)

        Gets or sets value that permits searching for text related graphics (underlining, background etc.) during text search. false - graphic elements that may present in source document will be ignored (default value). true - searching for text related graphics will be performed. It may decrease performance of text search and edit. It also may change graphical elements that look like text related.

        Parameters:
        value - boolean value