TC_UserP
7 years agoContributor
PDF Testing
PDF Testing:
I followed the documentation and downloaded the pdfbox jar files and added the java classes in the Java bridge.
And tried executing the below script:
function loadDocument(P1)
{
var docObj;
docObj = JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3(P1);
return docObj;
}
function getDocument()
{
docObj = loadDocument("C:\\Work\\P1.pdf");
return test;
}
This returns an error :
JavaScript runtime error.
TypeError: JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3 is not a function
TypeError: JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3 is not a function
Attached the screenshot
Also, let me know if there are any configurations more I have to do. I dont know why this function is not identified!
Hi,
Most probably, it's all Java and its versioning...
and
https://community.smartbear.com/t5/TestComplete-Desktop-Testing/Compare-pdf-files/m-p/122339
might help...