-
PDFBoxLibrary
Hello,
I am using PDFBox to read and to extract the text from the PDF file, my code is:
PDFTextStripper stripper = new PDFTextStripper();
stripper.setSortByPosition(false);
stripper.setStartPage(1);
stripper.setEndPage(2);
org.pdfbox.pdmodel.PDDocument doc = org.pdfbox.pdmodel.PDDocument.load(ficheroPdf);
System.out.println("El numero de paginas es"+ doc.getNumberOfPages());
System.out.println("El texto extraido es "+ stripper.getText(doc));
doc.close();
But I have the next error when I run my aplication:
"Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.pdfbox.util.operator.OperatorProcessor.setCont ext(Lorg/pdfbox/util/PDFStreamEngine;)"
Can you help me?
Thanks.
-
My guess is you don't have the pdfbox jar file in your CLASSPATH.