Class: TextDiffOptions

Core.PDFNet.PDFDoc. TextDiffOptions


new TextDiffOptions()

Options for PDFNet.PDFDoc.appendTextDiffDocOpt

Methods


addIgnoreZonesForPage(regions, page_num)

Adds a collection of ignorable regions for the given page, an optional list of page areas not to be included in analysis
Parameters:
Name Type Description
regions Array.<Core.PDFNet.Rect> the zones to be added to the ignore list
page_num number the page number the added regions belong to
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

getColorA()

Gets the value ColorA from the options object The difference color for deletions
Returns:
an object in form {R: number, G: number, B: number}, the current value for ColorA.
Type
object

getColorB()

Gets the value ColorB from the options object The difference color for insertions
Returns:
an object in form {R: number, G: number, B: number}, the current value for ColorB.
Type
object

getCompareUsingZOrder()

Gets the value CompareUsingZOrder from the options object Whether to use z-order (aka paint order) when comparing text between A and B. On by default.
Returns:
whether to use z-order (aka paint order) when comparing text between A and B. On by default.
Type
boolean

getExtraMoveColor()

Gets the value ExtraMoveColor from the options object The difference color for extra moves
Returns:
an object in form {R: number, G: number, B: number}, the current value for ExtraMoveColor.
Type
object

getExtraMoveHighlight()

Gets the value ExtraMoveHighlight from the options object Whether to highlight text in between short-distance moves when comparing text between A and B. Off by default.
Returns:
whether to highlight text in between short-distance moves when comparing text between A and B. Off by default.
Type
boolean

getExtraMoveOpacity()

Gets the value ExtraMoveOpacity from the options object The difference opacity for extra moves
Returns:
the current value for ExtraMoveOpacity in between 0.0 (transparent) and 1.0 (opaque).
Type
number

getOpacityA()

Gets the value OpacityA from the options object The difference opacity for deletions
Returns:
the current value for OpacityA in between 0.0 (transparent) and 1.0 (opaque).
Type
number

getOpacityB()

Gets the value OpacityB from the options object The difference opacity for deletions
Returns:
the current value for OpacityB in between 0.0 (transparent) and 1.0 (opaque).
Type
number

getShowPlaceholders()

Gets the value ShowPlaceholders from the options object Whether to show placeholder annotations. On by default. Placeholders are insertion locations in document A and deletion locations in document B. For example, if a word is removed from document B, we can highlight the location of the original word in document A, but there is no word to highlight in B (it's removed). In this case a small "placeholder" annotation is placed in B to identify the location of the removal.
Returns:
whether to show placeholder annotations. On by default.
Type
boolean

setColorA(color)

Sets the value for ColorA in the options object The difference color for deletions
Parameters:
Name Type Description
color object the new value for ColorA, in form {R: number, G: number, B: number}
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setColorB(color)

Sets the value for ColorB in the options object The difference color for insertions
Parameters:
Name Type Description
color object the new value for ColorB, in form {R: number, G: number, B: number}
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setCompareUsingZOrder(value)

Sets the value for CompareUsingZOrder in the options object Whether to use z-order (aka paint order) when comparing text between A and B. On by default.
Parameters:
Name Type Description
value boolean whether to use z-order (aka paint order) when comparing text between A and B. On by default.
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setExtraMoveColor(color)

Sets the value for ExtraMoveColor in the options object The difference color for extra moves
Parameters:
Name Type Description
color object the new value for ExtraMoveColor, in form {R: number, G: number, B: number}
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setExtraMoveHighlight(value)

Sets the value for ExtraMoveHighlight in the options object Whether to highlight text in between short-distance moves when comparing text between A and B. Off by default.
Parameters:
Name Type Description
value boolean whether to highlight text in between short-distance moves when comparing text between A and B. Off by default.
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setExtraMoveOpacity(opacity)

Sets the value for ExtraMoveOpacity in the options object The difference opacity for extra moves
Parameters:
Name Type Description
opacity number the new value for ExtraMoveOpacity in between 0.0 (transparent) and 1.0 (opaque)
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setOpacityA(opacity)

Sets the value for OpacityA in the options object The difference opacity for deletions
Parameters:
Name Type Description
opacity number the new value for OpacityA in between 0.0 (transparent) and 1.0 (opaque)
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setOpacityB(opacity)

Sets the value for OpacityB in the options object The difference opacity for deletions
Parameters:
Name Type Description
opacity number the new value for OpacityB in between 0.0 (transparent) and 1.0 (opaque)
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions

setShowPlaceholders(whether)

Sets the value for ShowPlaceholders in the options object Whether to show placeholder annotations. On by default. Placeholders are insertion locations in document A and deletion locations in document B. For example, if a word is removed from document B, we can highlight the location of the original word in document A, but there is no word to highlight in B (it's removed). In this case a small "placeholder" annotation is placed in B to identify the location of the removal.
Parameters:
Name Type Description
whether boolean to show placeholder annotations. On by default.
Returns:
this object, for call chaining
Type
Core.PDFNet.PDFDoc.TextDiffOptions