Hi,
always use the latest version of PDFBox, which is 1.8.8.
I don't know what happens in "PdfUtil.decryptPDFDoc". The correct call
is openProtection().
Tilman
Am 15.01.2015 um 18:02 schrieb Chris Bamford:
Hi
Chris Bamford m: +44 7860 405292 w: www.mimecast.com
<http://www.mimecast.com/>
Senior Developer p: +44 207 847 8700 Address click here
<http://www.mimecast.com/About-us/Contact-us/>
------------------------------------------------------------------------
http://www.mimecast.com
<https://serviceB.mimecast.com/mimecast/click?account=C1A1&code=ffa3b3bfde3400d0d05f16917232f20a>
LinkedIn
<https://serviceB.mimecast.com/mimecast/click?account=C1A1&code=40f4961a022ce0e939ee090e8014d927>
YouTube
<https://serviceB.mimecast.com/mimecast/click?account=C1A1&code=69396c32e7aa099609ed860443d9bbe8>
Facebook
<https://serviceB.mimecast.com/mimecast/click?account=C1A1&code=1f9ba08b644cdd0edec3322be6312618>
Blog
<https://serviceB.mimecast.com/mimecast/click?account=C1A1&code=0fcd5601a0dd01d34f18b525b9219a0d>
Twitter
<https://serviceB.mimecast.com/mimecast/click?account=C1A1&code=564d8f1dcd711b82b39a647d5e991247>
I recently noticed the following runtime exception in my application
when trying to extract text from secured PDFs:
java.lang.VerifyError: (class: org/bouncycastle/cms/CMSSignedDataParser,
method: replaceSigners signature:
(Ljava/io/InputStream;Lorg/bouncycastle/cms/SignerInformationStore;Ljava/io/OutputStream;)Ljava/io/OutputStream;)
Incompatible argument to function
I am using PDFBox 1.8.6 and I use these APIs:
document = PDDocument.load(is,true);
if(document.isEncrypted()) {
PdfUtil.decryptPDFDoc(document);
}
...
I am assuming the error is occurring in the decryptPDFDoc() call?
My maven pom dependencies are:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15</artifactId>
<version>1.44</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15</artifactId>
<version>1.44</version>
</dependency>
Have I got this right?
Thanks for any pointers.
- Chris