com.aspose.pdf.facades

Class ReplaceTextStrategy



  • public final class ReplaceTextStrategy
    extends Object

    This class contains parameters which define PdfContentEditor behavior when ReplaceText operation is performed.

    • Constructor Detail

      • ReplaceTextStrategy

        public ReplaceTextStrategy()
    • Method Detail

      • isRegularExpressionUsed

        public boolean isRegularExpressionUsed()

        If false, string to find is a simple text. If true, string to find is regular expression.

        Returns:
        boolean value
      • setRegularExpressionUsed

        public void setRegularExpressionUsed(boolean value)

        If false, string to find is a simple text. If true, string to find is regular expression.

        Parameters:
        value - boolean value
      • getNoCharacterBehavior

        public int getNoCharacterBehavior()

        Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).

        Returns:
        NoCharacterAction value.
        See Also:
        ReplaceTextStrategy.NoCharacterAction
      • setNoCharacterBehavior

        public void setNoCharacterBehavior(int value)

        Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).

        Parameters:
        value - NoCharacterAction value.
        See Also:
        ReplaceTextStrategy.NoCharacterAction
      • getReplaceScope

        public int getReplaceScope()

        Scope of the replacement operation (replace first occurence or replace all occurences).

        Returns:
        Scope element
        See Also:
        ReplaceTextStrategy.Scope