private void extractFiguresFromAPage(ArrayList<TextPiece> linesOfAPage,
	    ArrayList<TextPiece> wordsOfAPage, int i, File pdfFile,
	    ArrayList<ArrayList<TextPiece>> linesByPage) {
	if (linesOfAPage.size() > 30) { // if this page is very short, it
					// usually does not contain tables
	    /*
	     * Checks for table keyword
	     */
	    boolean figureKwdExist = false;
	    int prevTableEndIndex = 0;
	    int k = -1;
	    for (TextPiece t : linesOfAPage) {
		k++;
		String textWithoutSpace = t.getText().replace(" ", "");
		TextPiece prevLine = (k == 0) ? null : linesOfAPage.get(k - 1);
		if (getMatchedFigureKeyword(textWithoutSpace) != null) {
		    figureKwdExist = true;
		    String figKwd = getMatchedFigureKeyword(textWithoutSpace);
		    System.out.println("In page " + (i + 1) + ": "
			    + textWithoutSpace);
		}
	    }
	} else {
	    /*
	     * Impossible to contain tables because of few texts in the page
	     */
	}
    }
private void extractFiguresFromAPage ( ArrayList < TextPiece > linesOfAPage , ArrayList < TextPiece > wordsOfAPage , int i , File pdfFile , ArrayList < ArrayList < TextPiece > > linesByPage ) { if ( linesOfAPage . size ( ) > 30 ) { boolean figureKwdExist = false ; int prevTableEndIndex = 0 ; int k = - 1 ; for ( TextPiece t : linesOfAPage ) { k ++ ; String textWithoutSpace = t . getText ( ) . replace ( " " , "" ) ; TextPiece prevLine = ( k == 0 ) ? null : linesOfAPage . get ( k - 1 ) ; if ( getMatchedFigureKeyword ( textWithoutSpace ) != null ) { figureKwdExist = true ; String figKwd = getMatchedFigureKeyword ( textWithoutSpace ) ; System . out . println ( "In page " + ( i + 1 ) + ": " + textWithoutSpace ) ; } } } else { } }
Extracts figures from ONE page

@param linesOfAPage
the list of lines of one page
@param wordsOfAPage
the list of words of one page
@param i
the current page id
@param linesByPage
the list of lines of the document