@qrcommunication/gigapdf-lib — SDK API reference - v0.110.3
    Preparing search index...

    Interface TextElementInfo

    A text element from GigaPdfDoc.textElements: the decoded text plus everything a host editor needs to recreate the run. index is the text-run index accepted by GigaPdfDoc.replaceText; the bounding box is page user space (origin bottom-left).

    interface TextElementInfo {
        index: number;
        text: string;
        x: number;
        y: number;
        width: number;
        height: number;
        fontFamily: string;
        baseFont: string;
        bold: boolean;
        italic: boolean;
        fontSize: number;
        color: [number, number, number];
        rotation: number;
        direction: "ltr" | "rtl" | "neutral";
    }
    Index

    Properties

    index: number
    text: string
    x: number
    y: number
    width: number
    height: number
    fontFamily: string

    Resolved /BaseFont family (e.g. "Helvetica", "Times New Roman").

    baseFont: string

    The raw /BaseFont name with the subset prefix kept (e.g. "ABCDEF+TimesNewRomanPSMT"), resolved against the run's own scope — the page, or the form XObject the run is drawn inside. Lets a host target the exact embedded subset rather than only the collapsed fontFamily. Empty when the run's font carried no /BaseFont (e.g. a Type3 font).

    bold: boolean
    italic: boolean
    fontSize: number

    Effective glyph size in points.

    color: [number, number, number]

    RGB fill colour, 0..1 per channel.

    rotation: number

    Baseline rotation in degrees (0 = upright).

    direction: "ltr" | "rtl" | "neutral"

    Reading direction of this run by its strong characters: "rtl" for Arabic/Hebrew, "ltr" for Latin/Greek/Cyrillic/CJK, "neutral" when the run is only digits/punctuation/whitespace.