Forum Discussion

JovaniBR's avatar
JovaniBR
Occasional Contributor
3 months ago

How to correctly configure Java Bridge in TestComplete to use PDFBOX

Hi All!

I'm using TC version: 15.54.3.7 x64 - license: Desktop

I need to convert PDF file to TXT. I looked on the Smartbear support website and found this reference https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete/ however, this link is no longer working :(

Read in the community about using the Javaclasses org_apache_pdfbox_tools.ExtractText. So, I downlaoded JAR for PDFBOX and configured Java Bridge in TC (I believe I didn't do the correct configuration).

When I run the test, it returns an error:

JavaScript runtime error.
TypeError: Cannot read property 'ExtractText' of undefined

Attached the screenshots.

How do I correctly configure the Java Bridge to use PDFBOX?
Any option other than TC's Intelligent Quality to convert PDF to TXT?

Your help will be really appreciated. Thanks :)

Regards,
Jovani

3 Replies

    • JovaniBR's avatar
      JovaniBR
      Occasional Contributor

      Hi rraghvani  Thank you for your help, but I had already seen this link... I believe I'm not doing it right when adding a new class name to the Java Classes list... it's correct that way?

       

      • rraghvani's avatar
        rraghvani
        Champion Level 3

        I don't see anything wrong, with what you have. I've never used Java Bridge before, but it might be worth searching the forum to see if anyone else has posted or provided a solution.