Expand my Community achievements bar.

SOLVED

How can I encrypt reader extended documents?

Avatar

Level 2

Hi,

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.

Regards,

Arne

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

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.

Regards

Steve

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

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.

Regards

Steve

Avatar

Level 2

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.

Avatar

Level 2

Hi,

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.

Cheers,

Arne

Avatar

Level 2

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,

Arne

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----