[ https://issues.apache.org/jira/browse/PDFBOX-5062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538107#comment-17538107 ]
Michael Klink commented on PDFBOX-5062: --------------------------------------- {quote}if that is the case why I am able to open this document in any pdf viewer.{quote} Viewers often are built to ignore or fix many errors under the hub. While this may be ok for PDF viewers where the user usually can directly see whether a repair attempt failed or succeeded, it is not ok for a PDF library running automatically where the output may be forwarded directly to thousands of potential customers or be archived in some legal archive. (Strictly speaking it is *not ok* even for viewers as something wrong might be shown without being recognizable as rubbish; thus, never trust what you see in a PDF viewer!) > IllegalBlockSizeException when loading the file > ----------------------------------------------- > > Key: PDFBOX-5062 > URL: https://issues.apache.org/jira/browse/PDFBOX-5062 > Project: PDFBox > Issue Type: Bug > Components: Crypto, PDModel > Affects Versions: 2.0.22 > Reporter: Zubair Uddin Farooqui > Priority: Major > Attachments: Medical services-1 (dup-keywords) (1).pdf > > > Getting _IllegalBlockSizeException_ when loading the fileĀ > *Code:* > {code:java} > PDDocument pdDoc = PDDocument.load(file);{code} > *Exception:* > {code:java} > java.io.IOException: javax.crypto.IllegalBlockSizeException: Input length > must be multiple of 16 when decrypting with padded cipherjava.io.IOException: > javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 > when decrypting with padded cipher at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptDataAESother(SecurityHandler.java:315) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(SecurityHandler.java:201) > at > org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decryptStream(SecurityHandler.java:510) > at org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:929) > at > org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:886) > at > org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:806) > at > org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:766) at > org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:187) at > org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:226) at > org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1099) at > org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1082) at > org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1041) at > org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:989) > {code} -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org