如何在java中使用itext检查pdf是否受保护
我正在使用itext库来了解pdf文件是否受到保护。 我还在将boncycastle库添加到我的类路径中,但它仍然显示错误:如何在java中使用itext检查pdf是否受保护,java,pdf,itext,Java,Pdf,Itext,我正在使用itext库来了解pdf文件是否受到保护。 我还在将boncycastle库添加到我的类路径中,但它仍然显示错误: Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.DEREncodable at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.s
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.DEREncodable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
将此库放在类路径中 更新
根据您正在使用的IText版本,注意您的bouncy castle dependencies版本。使用maven存储库对其进行双重检查。例如或+1;但是,请检查maven pom的首选弹跳城堡版本。例如,版本5.5.0记录了对BC 1.49的依赖。