0

I am new to service method in java i don't solve this problem my application, can you any solve this problem .. How can i solve this errors only ...

java:

 textStripper.setHtmlService(htmlService);
    textStripper.setHtmlDocument(html);

Errors:

  Exception in thread "main" java.lang.NoSuchMethodError: org.apache.pdfbox.util.PDFTextStripper.setHtmlService(Lpdf2html/service/intf/HTMLService;)V
        at pdf2html.service.impl.PDF2HTMLServiceImpl.convertPage(PDF2HTMLServiceImpl.java:60)
        at pdf2html.Main.main(Main.java:27)
Java Result: 1

...

when track errors, i can command this line i got only text... service not working..

AlexPandiyan
  • 4,467
  • 2
  • 14
  • 11

1 Answers1

0

First of all, check the jar version you downloaded has the class and methods you secified in your code.

Download the JAD GUI (Java Decompiler) from the link below

http://jd.benow.ca/

using the jad open the specific jar and see whether u can find the class name "PDFTextStripper" has method setHtmlService. If not download the latest jar file and set it to the java build path.

Swathi
  • 602
  • 4
  • 17