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

Adobe encrypted document doesn't parse correct (Acrobat 9 compatibility)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.8.1
    • None
    • Parsing
    • None

    Description

      Trying to parse and receive some information from encrypted documents created with Adobe 9 with compatibility to Acrobat 9, cause an error while decrypting informations.

      I tested documents with follow compatibility:
      Acrobat 3 (40-bit RC4) -> works
      Acrobat 5 & 6 (128-bit RC4) -> work
      Acrobat 7 (128-bit AES) -> work
      Acrobat 9 (256-bit AES) -> doesn't work

      The follow error will be thrown.

      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
      at java.lang.System.arraycopy(Native Method)
      at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeEncryptedKey(StandardSecurityHandler.java:591)
      at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeUserPassword(StandardSecurityHandler.java:628)
      at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.isUserPassword(StandardSecurityHandler.java:812)
      at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:213)
      at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.decryptDocument(StandardSecurityHandler.java:154)
      at org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1509)
      at org.apache.pdfbox.pdmodel.PDDocument.decrypt(PDDocument.java:919)
      at de.bos_bremen.pdftoolbox.testing.Test.main(Test.java:45)

      Attachments

        1. Test_secured Adobe9.pdf
          16 kB
          Thomas Chojecki
        2. Test_secured Adobe7_compatible.pdf
          16 kB
          Thomas Chojecki
        3. Test.pdf
          16 kB
          Thomas Chojecki

        Issue Links

          Activity

            People

              tchojecki Thomas Chojecki
              tchojecki Thomas Chojecki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: