12 Replies Latest reply on May 4, 2018 2:25 PM by kingaling

    Can't decrypt attachment with Crypt filter

    dirckb Level 1

      This question has been asked a couple of times previously and the answers are not helpful.

       

      A PDF encrypted with attachments only (attachments use the /Crypt filter, /StdCF) does not work the same as a PDF encrypted with all-data-encrypted.

       

      I have software that can read one but not the other.

       

      Conversely, I have two PDFs created (by me) with identical format except for this setting.

      The trailer ID is the same, the Crypt settings are the same (/EncryptMetadata false, /U, /O, /R /V, etc.,

      except one is set up with attachments only (/StmF /Identity /StrF /Identity, and /StdCF /AuthEvent /EFOpen)

      and one with everything (/StmF /StdCF /StrF /StdCF, and /StdCF /AuthEvent /DocOpen.)

       

      Let me stress: these files are *identical* except for these settings and the encrypted v non-encrypted data.

      All of the objects have the same object id's, etc.

       

      The contents of the encrypted attachment stream is *identical* byte for byte, between the two files,

      and Acrobat can extract the attachment from the fully encrypted file but generates a 0 byte file for the other.

       

      3rd party software: QPdf (5.1.3) cannot read the attachment from the Acrobat generated file, but *can* read it from the file I generated.

      Foxit reader (7.03.916) can read the one generated by Acrobat, but extracts garbage from the file I generated.

       

      I've been over the PDF reference 1.7 and the supplements and can't find any magic tricks.  Any help would be appreciated.