public class

TextBlock

extends Object
java.lang.Object
   ↳ com.pspdfkit.api.TextBlock

Class Overview

An immutable class representing a block of text on a page. Contains the text string and the page coordinates in the form of a Rect. See getTextLines() to retrieve the text from a page split into TextBlocks representing lines.

Summary

Fields
public final Rect rect A Rect representing the area on the page covered by this block.
public final String text The String of text for this block.
Public Constructors
TextBlock(String text, Rect rect)
Constructs a TextBlock with a string and rect.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final Rect rect

A Rect representing the area on the page covered by this block.

public final String text

The String of text for this block.

Public Constructors

public TextBlock (String text, Rect rect)

Constructs a TextBlock with a string and rect.

Parameters
text A String representing the text in the block.
rect A Rect representing the area on the page where the text is located.