create

open fun create(@NonNull document: PdfDocument, @IntRange(from = 0) pageIndex: Int, @NonNull range: Range): TextBlock

Creates a TextBlock from the given page.

Parameters

document

Document this text block resides on.

pageIndex

Page this text block resides on.

range

Range of the text block on page (i.e. start and end character index).


open fun create(@IntRange(from = 0) pageIndex: Int, @NonNull range: Range, @NonNull pageRects: List<RectF>, @NonNull text: String): TextBlock

Creates a TextBlock from the given page.

Parameters

text

The represented string on the document.

pageIndex

Page this text block resides on.

range

Range of the text block on page (i.e. start and end character index).

pageRects

PDF rects represented by this text block.


open fun create(@NonNull document: PdfDocument, @NonNull annotation: Annotation, @NonNull range: Range): TextBlock

Creates TextBlock from textual annotation.

Parameters

document

Document this text block resides on.

annotation

Annotation this text block resides on.

range

Range of the text block inside annotation (i.e. start and end character index).