public final class ReplaceTextStrategy extends Object
This class contains parameters which define PdfContentEditor behavior when ReplaceText operation is performed.
Modifier and Type | Class and Description |
---|---|
static class |
ReplaceTextStrategy.NoCharacterAction
Action to perform if font does not contain required character
|
static class |
ReplaceTextStrategy.Scope
Scope where replace text operation is applied
REPLACE_FIRST by default
|
Constructor and Description |
---|
ReplaceTextStrategy() |
Modifier and Type | Method and Description |
---|---|
int |
getNoCharacterBehavior()
Action which is performed when no approppriate font found for changed text
(Throw exception / Substitute other font / Replace anyway).
|
int |
getReplaceScope()
Scope of the replacement operation (replace first occurence or replace all occurences).
|
boolean |
isRegularExpressionUsed()
If false, string to find is a simple text.
|
void |
isRegularExpressionUsed(boolean value) |
void |
setNoCharacterBehavior(int value) |
void |
setReplaceScope(int value)
Scope of the replacement operation (replace first occurence or replace all occurences).
|
public boolean isRegularExpressionUsed()
If false, string to find is a simple text. If true, string to find is regular expression.
public void isRegularExpressionUsed(boolean value)
public int getNoCharacterBehavior()
Action which is performed when no approppriate font found for changed text (Throw exception / Substitute other font / Replace anyway).
public void setNoCharacterBehavior(int value)
public int getReplaceScope()
Scope of the replacement operation (replace first occurence or replace all occurences).
public void setReplaceScope(int value)
Scope of the replacement operation (replace first occurence or replace all occurences).
Example: ReplaceTextStrategy replaceTxt = new ReplaceTextStrategy(); replaceTxt.setReplaceScope(ReplaceTextStrategy.Scope.REPLACE_ALL);
ReplaceTextStrategy.Scope
Copyright © 2018 Aspose. All Rights Reserved.