@Test public void testGetNumOfPages() throws IOException { int num = PdfParser.getNumOfPages("G:/19cbooksNew/674840.dat"); assertTrue(num==22); }
public static int getNumOfPages(String pdfFile) throws IOException { PDDocument pdf = PDDocument.load(new File(pdfFile)); int count = pdf.getNumberOfPages(); pdf.close(); return count; }
PdfParser { public static int getNumOfPages(String pdfFile) throws IOException { PDDocument pdf = PDDocument.load(new File(pdfFile)); int count = pdf.getNumberOfPages(); pdf.close(); return count; } }
PdfParser { public static int getNumOfPages(String pdfFile) throws IOException { PDDocument pdf = PDDocument.load(new File(pdfFile)); int count = pdf.getNumberOfPages(); pdf.close(); return count; }  }
PdfParser { public static int getNumOfPages(String pdfFile) throws IOException { PDDocument pdf = PDDocument.load(new File(pdfFile)); int count = pdf.getNumberOfPages(); pdf.close(); return count; }  static int getNumOfPages(String pdfFile); }
PdfParser { public static int getNumOfPages(String pdfFile) throws IOException { PDDocument pdf = PDDocument.load(new File(pdfFile)); int count = pdf.getNumberOfPages(); pdf.close(); return count; }  static int getNumOfPages(String pdfFile);  }