You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/11/25 23:18:13 UTC
[jira] [Resolved] (PDFBOX-2522)
javax.crypto.IllegalBlockSizeException in ExtractText
[ https://issues.apache.org/jira/browse/PDFBOX-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-2522.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.8.8
[~tilman] You already fixed that in the trunk, see [r1638940|https://svn.apache.org/r1638940]. The old parser tries to decrypt the cross reference stream, but that one shall not be encrypted.
> 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
> Fix For: 1.8.8
>
> 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)