@@ -53,7 +53,7 @@ class _MyHomePageState extends State<MyHomePage> {
5353 'Extract text with predefined bounds' ,
5454 style: TextStyle (color: Colors .white),
5555 ),
56- onPressed: _extractTextWidthBounds ,
56+ onPressed: _extractTextWithBounds ,
5757 color: Colors .blue,
5858 ),
5959 FlatButton (
@@ -101,7 +101,7 @@ class _MyHomePageState extends State<MyHomePage> {
101101 _showResult (text);
102102 }
103103
104- Future <void > _extractTextWidthBounds () async {
104+ Future <void > _extractTextWithBounds () async {
105105 //Load the existing PDF document.
106106 PdfDocument document =
107107 PdfDocument (inputBytes: await _readDocumentData ('invoice.pdf' ));
@@ -110,7 +110,7 @@ class _MyHomePageState extends State<MyHomePage> {
110110 PdfTextExtractor extractor = PdfTextExtractor (document);
111111
112112 //Extract all the text from the particular page.
113- List <TextLine > result = extractor.extractTextWithLine (startPageIndex: 0 );
113+ List <TextLine > result = extractor.extractTextLines (startPageIndex: 0 );
114114
115115 //Predefined bound.
116116 Rect textBounds = Rect .fromLTWH (474 , 161 , 50 , 9 );
@@ -173,7 +173,7 @@ class _MyHomePageState extends State<MyHomePage> {
173173 PdfTextExtractor extractor = PdfTextExtractor (document);
174174
175175 //Extract all the text from specific page.
176- List <TextLine > result = extractor.extractTextWithLine (startPageIndex: 0 );
176+ List <TextLine > result = extractor.extractTextLines (startPageIndex: 0 );
177177
178178 //Draw rectangle..
179179 for (int i = 0 ; i < result.length; i++ ) {
0 commit comments