Forum Discussion
if you want to use dot net classes I could show you how to make this working
Sure I can try using use dot net classes.
Can you please guide me through the steps required
- m_essaid10 years agoValued Contributor
get dlls here
http://www.squarepdf.net/pdfbox-in-net
(I have about 37 dlls in my folder it could change I didn't check last update)
Tools\CurrentProjectProperties\CLDBridge\Browse Files then add all the dlls
Then, for example, to get all PDF test in a TestComplete's Message : (delphi script)
strFileName:= ChooseYourFile;
doc:= dotNET.org_apache_pdfbox_pdmodel.PDDocument.load(strFileName);
if (doc.isEncrypted()) then
begin
doc.decrypt('');
doc.setAllSecurityToBeRemoved(true);
end;
pdfStripper:= dotNET.org_apache_pdfbox_util.PDFTextStripper.zctor_2();
str:= pdfStripper.getText_2(doc);
Log.Message('See Additional Info ', str);I hope it will work
- AMITESH10 years agoContributor
I tried the steps provided by you.
for 'dotNET.org_apache_pdfbox_pdmodel.PDDocument.load(strFileName)'
I am getting error 'org_apache_pdfbox_pdmodel.PDDocument' is null or not an object
I checked it and I see that undet dotNET , 'org_apache_pdfbox_pdmodel' is not getting listed
- m_essaid10 years agoValued Contributor
1) could you please check if you have any autocompletion with the dotNET word ?
(type "dotNET." then press control-backspace)
2)
have you got theses extensions checked in your file menu ?
(see attached)
- AMITESH10 years agoContributor
Hi,
I am using the function suggested by you but in JScript
function Testpdf()
{
var strFileName = "D:\\PDFCompare\\1.pdf";var doc = dotNET.org_apache_pdfbox_pdmodel.PDDocument.load(strFileName);
var pdfStripper = dotNET.org_apache_pdfbox_util.PDFTextStripper.zctor_2();
var str = pdfStripper.getText_2(doc);
Log.Message("See Additional Info", str);
}here I am getting error for :
var str = pdfStripper.getText_2(doc);
Error Message:
java.io.IOException
Please find the attachment for details
- AMITESH10 years agoContributor
The Issue is solved.
Problem was with 'PDF file' it was secured.
I tried with a different PDF which was not secured and It worked without any Problem.