4 Replies Latest reply on Apr 12, 2011 2:49 AM by ArneAtAdobe

    How can I encrypt reader extended documents?



      I use the Java API of the livecycle ES to encrypt a dynamic, reader extended PDF. I get the error message:


      ALC-ENC-100-015 Can not encrypt reader extended document.


      My use case is the following:

      A document is sent to some users. It is encrypted with a certificate. The users enter data into the document, encrypt it again and send it back via email. The document is never sent unencrypted. A server receives the email, extracts the document and reads the data the user entered.


      How can I implement this use case when I cannot encrypt reader extended documents?


      Thanks in advance for your answer.



        • 1. Re: How can I encrypt reader extended documents?
          SForrest96 Level 4

          The order of operations is always Encrypt (first), Reader Extend (second), (and if you are also certifying the document) Certify (third) (when you certify a document, an "Author" digital signature is applied to the document).


          There is no way around this, the document must be encrypted first, then RE applied.




          • 2. Re: How can I encrypt reader extended documents?
            ArneAtAdobe Level 1

            oh, I can add RE to an encrypted document? that is good to know. Plus I did not realize that I can add RE with the Java API.


            Thank you very much for your answer, this helped a lot.

            • 3. Re: How can I encrypt reader extended documents?
              ArneAtAdobe Level 1


              I implemented encryption and reader extension and I get the following error when I add reader extensions to my formerly encrypted document:


              Caused by: com.adobe.livecycle.readerextensions.client.ProcessingException: ALC-RES-001-022: The input PDF document is encrypted and needs to be unlocked for this operation.



              When I do it the other way round, I get the error message I described above. So, how can I encrypt and reader extend my document?


              There is a thread here but it does not solve my problem.


              Thanks in advance for your help.




              • 4. Re: How can I encrypt reader extended documents?
                ArneAtAdobe Level 1

                Problem solved, you have to unlock the pdf before adding reader extensions.


                There is a difference between unlocking and removing encryption. When you unlock a pdf you just open it up for some operations. After that (precisely: when you call the getInputStream() method) it will be locked (encrypted) again.


                When you add encryption to a document, it is added when you persist the doc somehow. From the document's point of view persisting means calling the getInputStream() method. That method is used when you copy the document to a file. This means that you can encrypt a document and add reader extension right after that without unlocking the pdf. When you save it afterwards the encryption wil be applied.


                When you encrypt a document, save it and then add RE, you have to unlock it first, because the encryption is already applied.


                I hope this helps someone to save the time I needed to figure that out.


                Happy encrypting,