[ https://issues.apache.org/jira/browse/PDFBOX-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225303#comment-14225303 ]
ASF subversion and git services commented on PDFBOX-2522: --------------------------------------------------------- Commit 1641716 from [~lehmi] in branch 'pdfbox/branches/1.8' [ https://svn.apache.org/r1641716 ] PDFBOX-2522: don't decrypt the cross-reference stream similar to Tilmans fix in the trunk > javax.crypto.IllegalBlockSizeException in ExtractText > ----------------------------------------------------- > > Key: PDFBOX-2522 > URL: https://issues.apache.org/jira/browse/PDFBOX-2522 > Project: PDFBox > Issue Type: Bug > Components: Parsing, Text extraction > Affects Versions: 1.8.8 > Reporter: Tilman Hausherr > Assignee: Andreas Lehmkühler > Attachments: 474863.pdf > > > The attached file can be viewed, but ExtractText is not possible: > {code} > Exception in thread "main" java.io.IOException: > javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 > when decrypting with padded cipher > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(SecurityHandler.java:361) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decryptStream(SecurityHandler.java:448) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decrypt(SecurityHandler.java:413) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decryptObject(SecurityHandler.java:389) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.proceedDecryption(SecurityHandler.java:178) > at > org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.decryptDocument(StandardSecurityHandler.java:164) > at > org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1224) > at > org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:265) > at > org.apache.pdfbox.tools.ExtractText.startExtraction(ExtractText.java:241) > at org.apache.pdfbox.tools.ExtractText.main(ExtractText.java:84) > at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:55) > Caused by: javax.crypto.IllegalBlockSizeException: Input length must be > multiple of 16 when decrypting with padded cipher > at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750) > at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676) > at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313) > at javax.crypto.Cipher.doFinal(Cipher.java:2145) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(SecurityHandler.java:343) > ... 10 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)