It was a java issue. If I have bcprov-jdk15-143.jar jar instead of
bcprov-jdk16-143.jar in my build path for my project, it works. I am using
jdk 1.5.

Thanks Mark.




newoutlook wrote:
> 
> The error message appears to be java issue. If I didn't enable security
> password for the pdf document, I was able to use iText pdfreader to read
> the doc. That is why I suspect it could be iText issue. 
> 
> 
> 
> 
> Mark Storer-2 wrote:
>> 
>> This is a Java-specific question rather than an iText-questions question.
>> 
>> Google Knows All:
>> http://www.google.com/search?q=bad+major+version+at+offset&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
>> 
>> The answer is within the first 3 links listed.
>> 
>> 
>> 
>> --Mark Storer 
>>   Senior Software Engineer 
>>   Cardiff.com
>> 
>> #include <disclaimer> 
>> typedef std::Disclaimer<Cardiff> DisCard; 
>> 
>> 
>> 
>>> -----Original Message-----
>>> From: newoutlook [mailto:[email protected]]
>>> Sent: Wednesday, September 16, 2009 2:22 PM
>>> To: [email protected]
>>> Subject: [iText-questions] security enabled pdf failed to open using
>>> pdfreader
>>> 
>>> 
>>> 
>>> I enabled security password for a pdf document. I tried open 
>>> the doc using
>>> iText Pdfreader. I get the following exception. Anybody come 
>>> across this
>>> issue?
>>> 
>>> Exception in thread "main" java.lang.UnsupportedClassVersionError:
>>> (org/bouncycastle/asn1/DEREncodable) bad major version at offset=6
>>>     at java.lang.ClassLoader.defineClassImpl(Native Method)
>>>     at java.lang.ClassLoader.defineClass(ClassLoader.java:258)
>>>     at 
>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.
>>> java:151)
>>>     at java.net.URLClassLoader.defineClass(URLClassLoader.java:589)
>>>     at java.net.URLClassLoader.access$400(URLClassLoader.java:123)
>>>     at 
>>> java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034)
>>>     at 
>>> java.security.AccessController.doPrivileged(AccessController.java:279)
>>>     at java.net.URLClassLoader.findClass(URLClassLoader.java:491)
>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
>>>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:328)
>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
>>>     at java.lang.J9VMInternals.verifyImpl(Native Method)
>>>     at java.lang.J9VMInternals.verify(J9VMInternals.java:68)
>>>     at java.lang.J9VMInternals.initialize(J9VMInternals.java:129)
>>>     at com.lowagie.text.pdf.PdfEncryption.<init>(Unknown Source)
>>>     at 
>>> com.lowagie.text.pdf.PdfReader.readDecryptedDocObj(Unknown Source)
>>>     at 
>>> com.lowagie.text.pdf.PdfReader.readDocObjPartial(Unknown Source)
>>>     at com.lowagie.text.pdf.PdfReader.readPdfPartial(Unknown Source)
>>>     at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
>>> -- 
>>> View this message in context: 
>> http://www.nabble.com/security-enabled-pdf-failed-to-open-using-pdfreader-tp25480929p25480929.html
>> Sent from the iText - General mailing list archive at Nabble.com.
>> 
>> 
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay 
>> ahead of the curve. Join us from November 9&#45;12, 2009. Register
>> now&#33;
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> 
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list:
>> http://1t3xt.info/tutorials/keywords/
>> 
>> 
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay 
>> ahead of the curve. Join us from November 9&#45;12, 2009. Register
>> now&#33;
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> 
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> Check the site with examples before you ask questions:
>> http://www.1t3xt.info/examples/
>> You can also search the keywords list:
>> http://1t3xt.info/tutorials/keywords/
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/security-enabled-pdf-failed-to-open-using-pdfreader-tp25480929p25531214.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to