public static void printStatInfo ( String outputDirPath , File pdfFile , int pageNum , int tableNum ) { try { File classificationData = new File ( outputDirPath , "statInfo" ) ; if ( ! classificationData . exists ( ) ) { classificationData . mkdirs ( ) ; } File fileName = new File ( classificationData , "tableNumStatInfo.txt" ) ; BufferedWriter bw0 = new BufferedWriter ( new FileWriter ( fileName , true ) ) ; bw0 . append ( outputDirPath + pdfFile . getName ( ) + "\t\t" + pageNum + " PAGES\t\t" + tableNum + " TABLES\n" ) ; bw0 . close ( ) ; } catch ( IOException e ) { System . out . printf ( "[Debug Error] IOException\n" ) ; } }
After processing all the PDF documents this method helps us to get the statistic information of all the PDF documents such as the total number of pages tables etc .