Hi again,
I have figured it out.
I should have coded:
PDDocument load = doc.load(new File("Shaffer.pdf"));
String docText=null;
try {
PDFTextStripper stripper=new PDFTextStripper();
//stripper.setStartPage(1);
//stripper.setEndPage(2);
docText=stripper.getText(load);
So I should assign the document to a variable (load), and then pass that
to getText. Easy if you know how!
Many thanks for your attention and help, it is much appreciated.
With best regards from New Zealand,
Michel
On 26/04/2015 18:23, Tilman Hausherr wrote:
Am 25.04.2015 um 04:25 schrieb Michel de Lange:
The program finds the file, and it is definitely a proper pfd with
contents. What am I doing wrong?
How do you know that it is definitively a proper PDF with contents?
Just because you see something on the screen doesn't mean you can
extract text.
https://pdfbox.apache.org/1.8/faq.html#notext
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]