[ https://issues.apache.org/jira/browse/PDFBOX-3628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-3628. ---------------------------------------- Fix Version/s: 3.0.0 PDFBox Resolution: Fixed Works fine in 3.0.0. The on demand parser is able to read the corrupted pdf > BadPaddingException on a valid document > --------------------------------------- > > Key: PDFBOX-3628 > URL: https://issues.apache.org/jira/browse/PDFBOX-3628 > Project: PDFBox > Issue Type: Bug > Components: Crypto, Parsing > Affects Versions: 2.0.3 > Environment: Windows 7 x64, JVM 1.8.0_101 > Reporter: Seva Alekseyev > Assignee: Andreas Lehmkühler > Priority: Major > Fix For: 3.0.0 PDFBox > > Attachments: Elisee i-765 final.pdf > > > On the attached document, which opens fine with Adobe Reader, the > PDDocument.load() throws an error: > java.io.IOException: javax.crypto.BadPaddingException: Given final block not > properly padded > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptDataAESother(SecurityHandler.java:296) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(SecurityHandler.java:153) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decryptStream(SecurityHandler.java:454) > at > org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:784) > at > org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:741) > at > org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:672) > at > org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:632) > at > org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:217) > at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:252) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:966) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:922) > at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:870) > Caused by: javax.crypto.BadPaddingException: Given final block not properly > padded > at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:966) > at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:824) > at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:436) > at javax.crypto.Cipher.doFinal(Cipher.java:2048) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptDataAESother(SecurityHandler.java:276) > ... 12 more -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org