Results 1 to 2 of 2

Thread: PDFBoxLibrary

  1. #1
    bgg
    bgg is offline Member
    Join Date
    Feb 2009
    Posts
    1
    Rep Power
    0

    Default 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.

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    My guess is you don't have the pdfbox jar file in your CLASSPATH.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •