You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Alixandre Santana <al...@gmail.com> on 2007/02/12 19:55:21 UTC

decrypting a PDF to read the content

Hi All,

I got this error when i tried to decrypt a pdf document encrypted by
com.lowagie.text.pdf.PdfEncryptor class, with a null password:

"java.lang.NoClassDefFoundError: org/bouncycastle/cms/CMSException"

Does anyone know which version of Bouncy Castle is the right one to
use with PDFBox API? i dont know anything about Bouncy Castle.

I´m using the LucenePdfDocument Class, from the PDFBox API to decrypt
the document, with a  null password.

Thanks in advance.
Alixandre

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: decrypting a PDF to read the content

Posted by Alixandre Santana <al...@gmail.com>.
you right.
No problem.


On 2/12/07, Chris Hostetter <ho...@fucit.org> wrote:
>
> since this question seems to be entirely about extracting text with PDFBox
> and not at all baout indexing the text once it's been extracted, perhaps
> it would be better suited for the PDFBox forums...
>
> http://www.pdfbox.org/
> http://sourceforge.net/forum/?group_id=78314
>
> ...i suspect you would find a much larger PDFBox user base there who can
> be of more assistance.
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Alixandre Santana

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: decrypting a PDF to read the content

Posted by Chris Hostetter <ho...@fucit.org>.
since this question seems to be entirely about extracting text with PDFBox
and not at all baout indexing the text once it's been extracted, perhaps
it would be better suited for the PDFBox forums...

http://www.pdfbox.org/
http://sourceforge.net/forum/?group_id=78314

...i suspect you would find a much larger PDFBox user base there who can
be of more assistance.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: decrypting a PDF to read the content

Posted by Alixandre Santana <al...@gmail.com>.
I´m using PDFBox 0.7.3

The problem i think its that i´m encrypting a PDF with Itext, with a
"null" User/Owner password. Then i try to decrypt the doc with a class
from PDFBOx. Its exactly there that
occurs the exception. That is, a format incompability problem.

In addition, i didnt found the  "org/bouncycastle/cms/CMSException" on
PDFBox lib, as you said. So...i tried to use the  "bcprov-jdk15-135",
a bouncy castle provider. Nothing happened.

do you have any idea?

Thanks


On 2/12/07, Ben Litchfield <be...@benlitchfield.com> wrote:
> PDFBox comes with a version of BouncyCastle that will work.  It is
> likely that other versions will also work as well.
>
> Is there a specific version that you have tried and didn't work?
>
> Ben
>
> Quoting Alixandre Santana <al...@gmail.com>:
>
> > Hi All,
> >
> > I got this error when i tried to decrypt a pdf document encrypted by
> > com.lowagie.text.pdf.PdfEncryptor class, with a null password:
> >
> > "java.lang.NoClassDefFoundError: org/bouncycastle/cms/CMSException"
> >
> > Does anyone know which version of Bouncy Castle is the right one to
> > use with PDFBox API? i dont know anything about Bouncy Castle.
> >
> > I´m using the LucenePdfDocument Class, from the PDFBox API to decrypt
> > the document, with a  null password.
> >
> > Thanks in advance.
> > Alixandre
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Alixandre Santana

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: decrypting a PDF to read the content

Posted by Ben Litchfield <be...@benlitchfield.com>.
PDFBox comes with a version of BouncyCastle that will work.  It is  
likely that other versions will also work as well.

Is there a specific version that you have tried and didn't work?

Ben

Quoting Alixandre Santana <al...@gmail.com>:

> Hi All,
>
> I got this error when i tried to decrypt a pdf document encrypted by
> com.lowagie.text.pdf.PdfEncryptor class, with a null password:
>
> "java.lang.NoClassDefFoundError: org/bouncycastle/cms/CMSException"
>
> Does anyone know which version of Bouncy Castle is the right one to
> use with PDFBox API? i dont know anything about Bouncy Castle.
>
> I´m using the LucenePdfDocument Class, from the PDFBox API to decrypt
> the document, with a  null password.
>
> Thanks in advance.
> Alixandre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org