extractTextLines method
Extract TextLine from an existing PDF document
startPageIndex and endPageIndex specifies the page range to be selected to extract text line. for example, startPageIndex is 0 and endPageIndex is 9 is used to extract text line from first page to 10 page of loaded PDF
for extracting text line from particular page, we can set an index of the page to startPageIndex
//Load an exisiting PDF document.
PdfDocument document = PdfDocument.fromBase64String(pdfData);
//Extract text from all pages
List<TextLine> textLine = PdfTextExtractor(document).extractTextLines();
//Dispose the document.
document.dispose();
Implementation
List<TextLine> extractTextLines({int? startPageIndex, int? endPageIndex}) {
return _extractTextLines(startPageIndex, endPageIndex);
}