I have used itext in the past where I have created a Java library with a class using the iText jars. This has worked perfectly in the past.
I now have some PDF's the gets corrupted when using setFormFlattening(true), therefor I have tried using the XFAFlattener, and this one works fine.
My problem is that I now need to load a license file via LicenseKey.loadLicenseFile and this works fine if I use my Java class from a Java agent. But if I try to use my Java class form a LotusScript agent, I get an "Certificate not found" error when LicenseKey.loadLicenseFile is called.
I can see that there is a itext.cer certificate inside the itext-licensekey-1.0.3.jar file. I guess it is this certificate that can't be found when running from a LotusScript agent.
Anyone knows how to get this to work?, maybe someone with deep iText knowledge know how this certificate is being loaded from the iText LicenceKey code, and can figure out what the problem can be.
There is no way to read a resource file in Java code if Java code is executed by LS2J.
As a workaround in my LS2J projects, I put the file content into a constant as base64 string and read this instead of resource file.
Another way is to put the code into an Java agent and to call the agent from LotusScript. This way Java code works as expected. Use an in-memory-document to "communicate" between LotusScript and Java.