Pdfviewer - TextComparisonOptions

30 Sep 20261 minute to read

Defines the configuration options for semantic text comparison between PDF documents.
The TextComparisonOptions class allows you to customize how text differences
are detected and visually represented during a comparison operation. It provides
settings for highlight colors, opacity levels, and difference visualization behavior
within the PDF Viewer component.

Properties

afterColor string

Specifies the highlight color used for differences in the modified (after) document.

Defaults to ‘green’

afterColorOpacity number

Specifies the opacity of the highlight color used for differences in the modified (after) document.
Accepts a value between 0 and 1.

Defaults to 0.4

beforeColor string

Specifies the highlight color used for differences in the original (before) document.

Defaults to ‘red’

beforeColorOpacity number

Specifies the opacity of the highlight color used for differences in the original (before) document.
Accepts a value between 0 and 1.

Defaults to 0.4

enableHighlights boolean

Determines whether highlight annotations should be rendered in the viewers.

Defaults to true