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.
page Index
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.
page Index
Page this text block resides on.
range
Range of the text block on page (i.e. start and end character index).
page Rects
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).