Skip to content

modern-pdf-lib


modern-pdf-lib / TextItem

Interface: TextItem

Defined in: src/parser/textExtractor.ts:31

A single extracted text item with position and font information.

Properties

fontName

fontName: string

Defined in: src/parser/textExtractor.ts:45

Font resource name (e.g. "/F1").


fontSize

fontSize: number

Defined in: src/parser/textExtractor.ts:43

Font size in user-space units.


height

height: number

Defined in: src/parser/textExtractor.ts:41

Approximate height of the text in user-space units (based on font size).


text

text: string

Defined in: src/parser/textExtractor.ts:33

The extracted text string.


width

width: number

Defined in: src/parser/textExtractor.ts:39

Approximate width of the text in user-space units.


x

x: number

Defined in: src/parser/textExtractor.ts:35

Horizontal position in user-space units.


y

y: number

Defined in: src/parser/textExtractor.ts:37

Vertical position in user-space units.

Released under the MIT License.