pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Gettting error on loading password protected docs
Date Sat, 24 Oct 2015 20:23:53 GMT
Sounds like a BC problem. Please try this before calling any PDFBox method:

Security.addProvider(new BouncyCastleProvider());


Tilman

Am 24.10.2015 um 22:18 schrieb Fred Andrews:
> In 2.0 todays build I am getting the following error when opening files
> that have a blank password.
>
> java.lang.NoSuchFieldError: as_sys_sec_alg_ideaCBC
> 	at
> 	org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings.configure(Unknown
> 	Source)
> 	at
> 	org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown
> 	Source)
> 	at
> 	org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown
> 	Source)
> 	at
> 	org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown
> 	Source)
> 	at
> 	org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown
> 	Source)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> 	org.bouncycastle.jce.provider.BouncyCastleProvider.<init>(Unknown
> 	Source)
> 	at
> 	org.apache.pdfbox.pdmodel.encryption.SecurityHandlerFactory.<clinit>(SecurityHandlerFactory.java:44)
> 	at
> 	org.apache.pdfbox.pdmodel.encryption.PDEncryption.<init>(PDEncryption.java:96)
> 	at
> 	org.apache.pdfbox.pdfparser.PDFParser.prepareDecryption(PDFParser.java:263)
> 	at
> 	org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:196)
> 	at
> 	org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:230)
> 	at
> 	org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:972)
> 	at
> 	org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:876)
>
> I am calling
>      document = PDDocument.load(inputstream)
>
>   with the intent to then call
>
>          if( document.isEncrypted() )
>
> But am getting the above error on the initial load.
>
> Is this a bug, a build problem, or has the call sequence for this
> changed in 2.0?
>
> I am building with the only related jar file being
> pdfbox-app-2.0.0-20151024.140816-1753.jar
>
>    Thanks
>    Fred Andrews
>    fred_andrews@fastmail.us
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message