[
https://issues.apache.org/jira/browse/PDFBOX-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225298#comment-14225298
]
Tilman Hausherr commented on PDFBOX-2522:
-----------------------------------------
I thought the problem was with both, but now I suspect I wasn't using the
latest version when I wrote in TIKA-1442, I had a build failure that I hadn't
noticed immediately. Now it is indeed only with the old parser.
> 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, 2.0.0
> Reporter: Tilman Hausherr
> 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)