Yes, excellent, I see it now.
many thanks for your help, I do very much appreciate it.
With best regards from New Zealand
Michel
On 26/04/2015 19:07, Tilman Hausherr wrote:
I found the problem. Your document is empty, as you don't assign the
result of "load()". Here's how to do it:
PDDocument doc = PDDocument.load(new File("Shaffer et al. 2015.pdf"));
String docText = null;
PDFTextStripper stripper = new PDFTextStripper();
stripper.setStartPage(1);
stripper.setEndPage(2);
docText = stripper.getText(doc);
System.out.println("Extract content pdf document length -> " +
docText.length());
output:
Extract content pdf document length -> 5172
Tilman
Am 26.04.2015 um 01:22 schrieb Michel de Lange:
Hi again,
Thank you for your help. I have set the start and end page, but it
makes no difference.
Extract content pdf document length -> 0
PDDocument doc = new PDDocument();
try {
doc.load(new File("Shaffer.pdf"));
String docText=null;
try {
PDFTextStripper stripper=new PDFTextStripper();
stripper.setStartPage(1);
stripper.setEndPage(2);
docText=stripper.getText(doc);
System.out.println("Extract content pdf document length
-> " + docText.length());
}
Many thanks,
Michel
On 25/04/2015 19:30, Gilad Denneboom wrote:
Try setting the start and end pages to strip...
On Sat, Apr 25, 2015 at 4:25 AM, Michel de Lange <
[email protected]> wrote:
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]