Interface: TextBlock

TextBlock

Describes the properties of a text block detected on a page.

Contains the text, the bounding box in PDF coordinates, and the anchor point.

Members




Members

anchor: object

The anchor point of the text block.

Type:
  • object
Properties:
Name Type Description
x number

The x coordinate of the anchor point.

y number

The y coordinate of the anchor point.

boundingBox: object

The current bounding box of the text block, in PDF coordinates.

Type:
  • object
Properties:
Name Type Description
top number

The top coordinate of the bounding box.

left number

The left coordinate of the bounding box.

width number

The width of the bounding box.

height number

The height of the bounding box.

id: string

Unique identifier for the text block.

Type:
  • string

maxWidth: number

The maximum width of the text block.

Type:
  • number

text: string

The text content of the text block.

If a text block contains multiple lines, the text will be a single string with new line characters.

Type:
  • string

See also