Class: FindReplaceOptions

PDFNet.FindReplace. FindReplaceOptions


new FindReplaceOptions()

Options for PDFNet.FindReplace.FindReplaceOptions

Members


<static> HorizAlignment

An enumeration used to specify the horizontal alignment of the new text added.
Type:
  • number
Properties:
Name Type Description
e_left number Apply left alignment to the new text.
e_center number Apply center alignment to the new text.
e_right number Apply right alignment to the new text.
e_full number Apply full alignment to the new text.

<static> MatchType

An enumeration used to specify the mode used to match text.
Type:
  • number
Properties:
Name Type Description
e_exact number Exactly match the text.
e_wildcards number Use of wildcards to match the text is allowed.
e_regex number Use of regular expressions to match the text is allowed.

<static> ReflowType

An enumeration used to specify the mode used to reflow the replaced text.
Type:
  • number
Properties:
Name Type Description
e_text number Reflow just the changed text.
e_line number Reflow the whole line of the changed text.
e_para number Reflow the whole paragraph of changed text.

Methods


getAlignment()

Gets the value Alignment from the options object. Specifies the horizontal alignment of the new text added.
Returns:
The current value for Alignment.
Type
number

getBatchSize()

Gets the value BatchSize from the options object. The number of pages to process before saving an intermediate PDF to free resources. A greater number of pages will increase memory usage, and a smaller number will increase processing time. Default is 20.
Returns:
The current value for BatchSize.
Type
number

getMatchCase()

Gets the value MatchCase from the options object. Specifies whether the case of the 'from' string should be exactly matched when finding text to replace. Ignored if MatchType is regex.
Returns:
The current value for MatchCase.
Type
boolean

getMatchMode()

Gets the MatchMode value from the options object. Specifies the mode used to match the text. the types of match are exact matching, wildcard matching and regular expression matching.
Returns:
The current value for MatchMode.
Type
number

getPages()

Gets the value Pages from the options object. Specifies a set of pages to process, such as "1-5", or "1-3,5,7-10". Open ended ranges are supported, e.g., "3-". By default all pages are processed. The first page is page number 1.
Returns:
The current value for Pages.
Type
string

getReflowMode()

Gets the value ReflowMode from the options object. Specifies the mode used to reflow the replaced text.
Returns:
The current value for ReflowMode.
Type
number

getWholeWords()

Gets the value WholeWords from the options object. Specifies whether whole words should be matched when finding text to replace. Ignored if MatchType is regex.
Returns:
The current value for WholeWords.
Type
boolean

setAlignment(value)

Sets the value for Alignment in the options object. Specifies the horizontal alignment of the new text added.
Parameters:
Name Type Description
value number The new value for Alignment
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions

setBatchSize(value)

Sets the value for BatchSize in the options object. The number of pages to process before saving an intermediate PDF to free resources. A greater number of pages will increase memory usage, and a smaller number will increase processing time. Default is 20.
Parameters:
Name Type Description
value number The new value for BatchSize
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions

setMatchCase(value)

Sets the value for MatchCase in the options object. Specifies whether the case of the 'from' string should be exactly matched when finding text to replace. Ignored if MatchType is regex.
Parameters:
Name Type Description
value boolean The new value for MatchCase
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions

setMatchMode(value)

Sets MatchMode value in the options object. Specifies the mode used to match the text. the types of match are exact matching, wildcard matching and regular expression matching.
Parameters:
Name Type Description
value number The new value for MatchMode
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions

setPages(value)

Sets the value for Pages in the options object. Specifies a set of pages to process, such as "1-5", or "1-3,5,7-10". Open ended ranges are supported, e.g., "3-". By default all pages are processed. The first page is page number 1.
Parameters:
Name Type Description
value string The new value for Pages
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions

setReflowMode(value)

Sets the value for ReflowMode in the options object. Specifies the mode used to reflow the replaced text.
Parameters:
Name Type Description
value number The new value for ReflowMode
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions

setWholeWords(value)

Sets the value for WholeWords in the options object. Specifies whether whole words should be matched when finding text to replace. Ignored if MatchType is regex.
Parameters:
Name Type Description
value boolean The new value for WholeWords
Returns:
This object, for call chaining.
Type
PDFNet.FindReplace.FindReplaceOptions