com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class TextReplaceOptions



  • public final class TextReplaceOptions
    extends TextOptions

    Represents text replace options

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  TextReplaceOptions.ReplaceAdjustment
      Determines action that will be done after replace of text fragment to more short.
      static class  TextReplaceOptions.Scope
      Scope where replace text operation is applied REPLACE_FIRST by default This obsolete option was kept for compatibility.
    • Constructor Summary

      Constructors 
      Constructor and Description
      TextReplaceOptions()
      Initializes new instance of the TextReplaceOptions object for the default adjustment and scope : ReplaceAdjustment.None and Scope.REPLACE_FIRST
      TextReplaceOptions(int scope)
      Initializes new instance of the TextReplaceOptions object for the specified scope.
      TextReplaceOptions(int adjustment, int scope)
      Initializes new instance of the TextReplaceOptions object for the specified after replace action.
    • Constructor Detail

      • TextReplaceOptions

        public TextReplaceOptions(int scope)

        Initializes new instance of the TextReplaceOptions object for the specified scope.

        Parameters:
        scope - Scope object.
        See Also:
        TextReplaceOptions.Scope
      • TextReplaceOptions

        public TextReplaceOptions(int adjustment,
                                  int scope)

        Initializes new instance of the TextReplaceOptions object for the specified after replace action.

        Parameters:
        adjustment - ReplaceAdjustment object.
        scope - Scope object.
        See Also:
        TextReplaceOptions.ReplaceAdjustment, TextReplaceOptions.Scope
      • TextReplaceOptions

        public TextReplaceOptions()

        Initializes new instance of the TextReplaceOptions object for the default adjustment and scope : ReplaceAdjustment.None and Scope.REPLACE_FIRST

    • Method Detail

      • getReplaceScope

        public int getReplaceScope()

        Gets a scope where replace text operation is applied

        Returns:
        int value
        See Also:
        TextReplaceOptions.Scope
      • setReplaceScope

        public void setReplaceScope(int value)

        Sets a scope where replace text operation is applied

        Parameters:
        value - int value
        See Also:
        TextReplaceOptions.Scope
      • getReplaceAdjustmentAction

        public int getReplaceAdjustmentAction()

        Gets an action that will be done after replace of text fragment to more short.

        Returns:
        ReplaceAdjustment element
        See Also:
        TextReplaceOptions.ReplaceAdjustment
      • setReplaceAdjustmentAction

        public void setReplaceAdjustmentAction(int value)

        Sets an action that will be done after replace of text fragment to more short.

        Parameters:
        value - ReplaceAdjustment element
        See Also:
        TextReplaceOptions.ReplaceAdjustment
      • getAdjustmentNewLineSpacing

        public double getAdjustmentNewLineSpacing()

        Gets or sets value of line spacing that used if replace adjustment is forced to create new line of text. The value expected is multiplier of font size of the replaced text. Default is 1.2.

        Returns:
        double value
      • setAdjustmentNewLineSpacing

        public void setAdjustmentNewLineSpacing(double value)

        Gets or sets value of line spacing that used if replace adjustment is forced to create new line of text. The value expected is multiplier of font size of the replaced text. Default is 1.2.

        Parameters:
        value - double value