com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class TextSearchOptions



  • public final class TextSearchOptions
    extends TextOptions

    Represents text search options

    • 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

      • 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