Ask a Question

Reading PDF /PDDocument.load_3 or load not found

SOLVED
mikakoistinen
Contributor

Reading PDF /PDDocument.load_3 or load not found

Hi,

I have tried to setup PDF reading accoring to instructions found here

https://support.smartbear.com/articles/testcomplete/testing-pdf-files-with-testcomplete/#Extr_Data_p...

 

I have java virtualmachine C:\Program Files (x86)\Java\jre1.8.0_131\bin\client\jvm.dll

and I have added pdf-box 1.8.13.jar and classes to project

https://www.dropbox.com/s/16ojffsuzzr53rc/javasettings.PNG?dl=0

 

In script I get error "Unknown name load_3". same for load and load_2. Code completion works only until 

JavaClasses.org_apache_pdfbox_pdmodel.PDDocument after PDDocument nothing is shown.

 

But for example code completion in JavaClasses.org_apache_pdfbox_util.PDFTextStripper  shows three instances of NewInstance?

What is wrong here? My code is quite simple

 

function LoadPdf( FileName );
var 
  docObj;
begin
  docObj := JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3( FileName );
  result :=  docObj;
end;

 

I have TestComplete 12.

 

thanks,

mika

 

 

Jeemly - Dream Big
https://jeemly.com/
2 REPLIES 2
mikakoistinen
Contributor

I think I solved this. I added pdfbox-app-2.0.6.jar to class paths and after that codecompletion started to work.

 

Jeemly - Dream Big
https://jeemly.com/

Hah... stupid me

I had added pdfbox-1.8.13.jar , not pdfbox-app-1.8.13.jar which is correct one.

This java world is so confusing...  Man Frustrated

 

Jeemly - Dream Big
https://jeemly.com/
cancel
Showing results for 
Search instead for 
Did you mean: