Hi Marin,
Unfortunately I could not make it work like Helen suggested - no matter where the files are and how they are referenced, I can not see the classes. |
Perhaps, in your case, TestComplete couldn't find some additional assemblies, to which the PDFBox-0.7.3.dll assembly refers. I just placed the following assemblies (taken from
http://sourceforge.net/projects/pdfbox/files/PDFBox/PDFBox-0.7.3/PDFBox-0.7.3.zip/download) to the same folder, then specified a reference to PDFBox-0.7.3.dll in the CLR Bridge project properties and this worked fine with my sample PDF document:
* PDFBox-0.7.3.dll
* FontBox-0.1.0-dev.dll
* IKVM.GNU.Classpath.dll
* IKVM.Runtime.dll
It is possible that some additional assemblies are required in your case. You can try to place all the assemblies from the PDFBox package to the folder with your PDFBox-0.7.3.dll library.
Furthermore, PDFBox ver. 0.7.3 is quite outdated. I would recommend that you download a later version of the PDFBox package (for instance, ver. 1.6.0 from
http://pdfbox.lehmi.de) or build it by yourself as it is described at
http://pdfbox.apache.org/userguide/building_pdfbox.html (what you have actually done).
Moreover, since you are using TestComplete ver. 8.50, you can try to use the
original Java PDFBox library with your TestComplete project instead of using its .NET version. For this purpose, you should specify the
Java Bridge project settings. For more information, please see the
Calling Functions From Java Classes help topic.
except that my stripped text is not a plain text but a consists only of special chars (see attached image). The string length is correct. My first thought was that maybe wrong encoding is causing this, but no matter what encoding is used (UTF-8, UTF-16, ISO-xxxx-x) nothing seems to work... |
What language is your stripped text written in? The point is that the Watch List panel in TestComplete is actually non-Unicode. Please try specifying the needed language in the
Language for non-Unicode programs system option (see
Setting the System Language Manually and
Setting the System Language From Scripts for details). Does this help?
Maybe it is a problem within PDFBox? |
You can try to check this by creating a simple application in C# or VB.NET that loads your PDFBox assembly and performs the same actions as your script code does. Then, you can try to debug your application, take a look at the results of the text processing and compare them with the results you see in the Watch List panel of TestComplete.