Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5062

IllegalBlockSizeException when loading the file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.22
    • None
    • Crypto, PDModel
    • None

    Description

      Getting IllegalBlockSizeException when loading the fileĀ 

      Code:

      PDDocument pdDoc = PDDocument.load(file);

      Exception:

      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)
      

      Attachments

        1. Medical services-1 (dup-keywords) (1).pdf
          774 kB
          Zubair Uddin Farooqui

        Activity

          People

            Unassigned Unassigned
            zubairuf Zubair Uddin Farooqui
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: