pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bamford <cbamf...@mimecast.com>
Subject Extraction of text from secured PDFs throws runtime exception
Date Thu, 15 Jan 2015 17:02:02 GMT
Hi

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

Chris Bamford
Senior Developer
m: +44 7860 405292
p: +44 207 847 8700
w: www.mimecast.com
Address click here: www.mimecast.com/About-us/Contact-us/







Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message