I've implemented simple text extraction method using PDFBox 1.8.10 in java. Cause of some reasons i have to upgrade library to PDFBox 2.0.2. Probably PDFTextStripper() method is removed or located another package in new version. Is there any way to get through this problem? Or can you suggest another way to get text from PDF?
Here is my code:
public String extractTextFromPdf() {
File jInputFile = new File("c:/lorem/ipsum.pdf");
PDDocument PDDoc = PDDocument.load(jInputFile );
String strContent = new PDFTextStripper().getText(PDDoc);
PDDoc.close();
return strContent;
}
Thanks in advance.