http://eason982.blogspot.com/2008/05/pdfextractor.html
API:
http://www.pdfbox.org/userguide/text_extraction.html
public class PDF_Reader { //讀pdf File f = new File("src\\Test\\test.pdf"); PDDocument document = PDDocument.load(f); PDFTextStripper stripper = new PDFTextStripper(); //設定從pdf的幾頁開始 stripper.setStartPage(1); //設定從pdf的幾頁結束 stripper.setEndPage(2); String mytext = stripper.getText(document); System.out.println(mytext); document.close();
}
|
gold coast gardeners Counter
沒有留言:
張貼留言