Skip to content

PageTextRun

A run: glyphs of one font, size, direction and marked content on one baseline, in logical order.

get actualText(): boolean

The text comes from an /ActualText span.

boolean


get bounds(): object

The bounds of its glyph quads in page space: { x, y, width, height }.

object

readonly height: number

readonly width: number

readonly x: number

readonly y: number


get font(): string

The font’s /BaseFont (document text).

string


get glyphRange(): readonly [number, number]

The [start, end) range of its glyphs in the page’s glyph arrays (PageText.buffers).

readonly [number, number]


get invisible(): boolean

Drawn invisibly (Tr 3 or 7: an OCR layer, hidden text).

boolean


get mcid(): number | undefined

The marked-content ID the run is in, if any (structure tree links).

number | undefined


get size(): number

Font size, the text matrix applied.

number


get text(): string

The run’s text in logical order (document text).

string


get vertical(): boolean

Vertical writing.

boolean

glyphs(): TextGlyph[]

Its glyphs, with their quads (built on each call).

TextGlyph[]