react-pdf-highlighter-plus

The result of getTextPosition.

interface TextPositionMatch {
    confidence: "exact" | "fuzzy";
    matchedText: string;
    pageNumber: number;
    position: ScaledPosition;
}

Properties

confidence: "exact" | "fuzzy"

"exact" = whitespace-insensitive verbatim, "fuzzy" = approximate match.

matchedText: string

The exact document text that was matched.

pageNumber: number

1-indexed page the match was found on.

position: ScaledPosition

Scaled position of the matched text, ready to use as a highlight position.