cancel
Showing results for 
Search instead for 
Did you mean: 

ADS needs a credential in order to work

Former Member
0 Kudos

Hello All,

We did some more investigation on that and found the following:

In the code

IWDPDFObject pdfObject = WDPDFObjectFactory.getPDFObject();

pdfObject.setData(dataSourceOutputStream);

pdfObject.setTemplate(templateSourceOutputStream);

pdfObject.setUserName(userName);

pdfObject.setLocale(new Locale(locale));

pdfObject.setUsageRights(null, PDFObject.getAllUsageRights());

pdfObject.setInteractive(false);

ByteArrayInputStream pdfInputStream = (ByteArrayInputStream)

pdfObject.createPDF();

The line pdfObject.setUsageRights(null, PDFObject.getAllUsageRights()); needs to be supplied if you set a ReaderRights credentials in the visual Admin tool.

If you don't have the ReaderRights credentials in the VisualAdmin tool then you need to delete this line pdfObject.setUsageRights(null, PDFObject.getAllUsageRights()); and then it works fine.

This is strange to me as the PDFObject.getAllUsageRights() is suppose to give us the correct entry depending on whether we do have the ReaderRigths credentials on the Visual Admin tool or not?

It appears the statement pdfObject.setUsageRights(null, PDFObject.getAllUsageRights()) crashes the application when no credential is installed (which definitely makes sense).

When a credential is installed the application crashes if this statement is NOT there.

Finally, the application runs fine when the statement AND the credential are deleted. It also runs when credential AND the statement are present.

Problem is: impossible to have a system where interactive forms are possible and not-interactive possible with a credential without having to pay the license, as the credential is apparently always accessed at runtime.

Thanks for your help and best regards,

André-Louis

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Ok, We got answer from OSS.

Use the new API PDFDocument

or install the credential that is free of charge.

Former Member
0 Kudos

Andre-Louis,

unfortunately i don't have a solution either, but i suppose to repost the topic in the . You'll might get an answer from the experts there.

Regards,

Stefan