Apply Reader Extension on Interactive Document | Community
Skip to main content
Level 2
Jan 18, 2021 5:11 AM UTC
Solved

Apply Reader Extension on Interactive Document

While using reader extension service in Adaptive form, i have set up keystore already and wrote java code to apply usage write but getting exception like below:

com.adobe.fd.docassurance.client.api.impl.DocAssuranceServiceImpl Exception while applying usage rights in DocAssuranceService
com.adobe.fd.readerextensions.client.ProcessingException: AEM-REX-001-008: Unable to apply the requested usage rights to the given document.
at com.adobe.fd.readerextensions.service.impl.ReaderExtensionsServiceImpl.applyUsageRights(ReaderExtensionsServiceImpl.java:215) [com.adobe.aemfd.adobe-aemfd-readerextensions:6.0.26]
at com.adobe.fd.docassurance.client.api.impl.DocAssuranceServiceImpl.addReaderExtensions(DocAssuranceServiceImpl.java:887) [adobe-aemfd-docassurance:6.0.50]
at com.adobe.fd.docassurance.client.api.impl.DocAssuranceServiceImpl.secureDocument(DocAssuranceServiceImpl.java:242) [adobe-aemfd-docassurance:6.0.50]

 

Can anyone help what may be missing here.

 

Thanks and regards,

Ashish Saxena

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Mayank_Gandhi
Mayank_GandhiAccepted solution
Employee
Feb 3, 2021 2:39 PM UTC

@sashish That should not make difference ideally. Make sure you are using a supported version of Linux.

24 replies

sashishAuthor
Level 2
Feb 4, 2021 12:22 PM UTC

@mayank_gandhi Hi Mayank,

Below is the linux version 

Red Hat Enterprise Linux Server release 7.9 (Maipo)

 

As the document is having more data , that might be the reason its taking time to apply usage right?

But its fast in windows system with same data.

Translate
Mayank_Gandhi
Mayank_GandhiAccepted solution
Employee
Feb 3, 2021 2:39 PM UTC

@sashish That should not make difference ideally. Make sure you are using a supported version of Linux.

Translate
sashishAuthor
Level 2
Feb 3, 2021 1:48 PM UTC

@mayank_gandhi That is resolved working fine in windows but applying usage right taking 8-10 minutes in linux server. i m not sure it OS issue or anything else? do you have any idea about it.

public com.adobe.aemfd.docmanager.Document enableReaderExtension(com.adobe.aemfd.docmanager.Document document,
ResourceResolver resolver) {

com.adobe.aemfd.docmanager.Document documentToReturn=null;
try{UsageRights usageRights = new UsageRights();
usageRights.setEnabledComments(true);
usageRights.setEnabledFormFillIn(true);

ReaderExtensionOptions readerOpts = ReaderExtensionOptions.getInstance();
readerOpts
.setReOptions(new ReaderExtensionsOptionSpec(usageRights, "Enable commenting in PDF and Form Fill In"));
readerOpts.setCredentialAlias("realias");
readerOpts.setResourceResolver(resolver);
ReaderExtensionsOptionSpec reOptionsSpec = new ReaderExtensionsOptionSpec(usageRights, "Sample ARES");
readerOpts.setReOptions(reOptionsSpec);
documentToReturn=docAssuranceService.secureDocument(document, null, null, readerOpts, null);
}catch(Exception ex){
logger.error("error in securing document",ex.getMessage());
ex.printStackTrace();
}
return documentToReturn;
}

 

I am using above method to apply usage rights but the below line returning response in 8-20 minutes which i observed.

documentToReturn=docAssuranceService.secureDocument(document, null, null, readerOpts, null);

 

Please suggest if its related to OS as same thing is working fine in windows.

 

 

Translate
Mayank_Gandhi
Employee
Feb 1, 2021 1:14 PM UTC

@sashish Is this resolved for you?

Translate
Employee
Jan 19, 2021 11:06 PM UTC

@sashish  have sent you private message

Translate
sashishAuthor
Level 2
Jan 19, 2021 7:25 AM UTC

Hi @girishbedekar 

PFA screenshot of key store and trust store.

Trust store is global and also its not mentioned in adobe documents that we have to setup trust store.

Its mentioned to setup only keystore.

Keystore:

 

truststore:

 

 

 

Translate
Level 8
Jan 19, 2021 7:06 AM UTC

Also I think trust store is global 

Translate
Level 8
Jan 19, 2021 7:02 AM UTC

Send us the screen shot of the certificate added to fd service user

Translate
sashishAuthor
Level 2
Jan 19, 2021 6:26 AM UTC

hi @girishbedekar ,

 

Trust store setup is also needed here?

Translate
Level 8
Jan 19, 2021 6:37 AM UTC
Yes
Translate