Adding BouncyCastle dependencies bcprov-jdk15on-1.49.jar to an iText Java Application in Eclipse Fails

I am using iText version 5.5.2 and am trying to implement passwords to prevent users from editing our generated static XFA PDF reports. I don't think I can hide the static XFA PDF form (so correct me if I'm wrong). My only option at this point would be to use iText's ability to password protect the form so that users don't have to worry about entering a password to edit the form, but still be able to view it.

Anyway, here's the problem. According to Lowagie's book, password injection requires the use of the bouncastle API. For this, I have implemented iText-5.5.2. Searching these iText dependencies, I found that the maven POM for iText-5.5.2 shows that I need multiple jars for bouncycastle:

<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk15on</artifactId>
    <version>1.49</version>
    <type>jar</type>
    <scope>compile</scope>
    <optional>true</optional>
</dependency>

<dependency>
   <groupId>org.bouncycastle</groupId>
   <artifactId>bcpkix-jdk15on</artifactId>
   <version>1.49</version>
   <type>jar</type>
   <scope>compile</scope>
   <optional>true</optional>
</dependency>

      

When I add them to my project in eclipse (IBM CICS Explorer), eclipse complains like this:

Description Resource type path Archive type for required library: 'C: /Users/nuo3545/jars/bcprov-jdk15on-1.49.jar' in project 'jCicsPdfUtility' could not be read or is not a valid zip file jCicsPdfUtility Build path Build Path problem

So it indicates that the jar being added (bcprov-jdk15on-1.49.jar) to the project property libraries or the classpath is bad or not recognized. Is there a solution for this?

Q. Are bouncing banks still a problem or broken for use with iText? How can I fix this problem?

Any help or direction in this regard is greatly appreciated.

+3


source to share





All Articles