ComPDFKit Web SDK
    Preparing search index...

    Interface TextHit

    Result of hit testing a point against page text.

    interface TextHit {
        charIndex: number;
        line: number;
        pageNumber: number;
        quad: Core.Annotations.Quad;
        side: "before" | "after";
        word: number;
    }

    Hierarchy (View Summary)

    Index
    charIndex: number

    Character index in the page text; as a caret position, the character it is before.

    line: number

    Index (0-based) of the line on the page.

    pageNumber: number

    Page number (1-based).

    Quad of the character that was hit, in page coordinates.

    side: "before" | "after"

    Whether it falls on the left or right half of the character, deciding whether the caret (selection endpoint) is before or after it

    word: number

    Index of the first character of the word