Accusoft PDF Viewer Documentation

v3.11.158639

Interface TextHighlight

Text highlight annotation state.

Hierarchy

Index

Properties

Optional fillColor

fillColor: string

Fill color. Value must be a CSS-style, six-digit hex color string (like '#fa0404').

defaultvalue

'#ffff00'

firstSelectedIndex

firstSelectedIndex: number

Determines the first "letter" of text to highlight. Value is a zero-based index into the UTF-16 code units for the text of the page where the highlight begins (specified by pageNumber) determining the first grapheme ("letter") to include in the highlight. Value must be an integer greater than or equal to 0. If the value falls in the middle of a grapheme that is made up of multiple UTF-16 code units, the highlight will automatically expand to include the entire grapheme.

Optional id

id: string

Unique identifier for the annotation.

defaultvalue

undefined

lastPageNumber

lastPageNumber: number

One-indexed page number where the highlight annotation ends. Must be an integer greater than or equal to pageNumber.

lastSelectedIndex

lastSelectedIndex: number

Determines the last "letter" of text to highlight. Value is a zero-based index into the UTF-16 code units for the text of the page where the highlight ends (specified by lastPageNumber) determining the last grapheme ("letter") to include in the highlight. Value must be an integer greater than or equal to 0. If the value falls in the middle of a grapheme that is made up of multiple UTF-16 code units, the highlight will automatically expand to include the entire grapheme. Note that this end index is inclusive: the grapheme indicated by the value will be included in the highlight.

pageNumber

pageNumber: number

One-indexed page number where the annotation is placed. Must be an integer greater than zero.

Optional renderingMetadata

renderingMetadata: object[]

Internal metadata about how to render a text highlight. When this property is present, you should not modify or remove it. Calls to PdfViewerControl.getAnnotations will include this property so that, if you persist the annotations and then reload them in a future version of our viewer, we can ensure the text highlight is positioned correctly.

type

Indicates this annotation is a TextHighlight.

Legend

  • Property
  • Method
  • Static method
© 2022 Accusoft Corporation. All rights reserved.