Expand my Community achievements bar.

SOLVED

Generate Interactive PDF using xdp and xml

Avatar

Community Advisor

Hi All,

I'm trying to create Interactive PDF with using an xdp and associated xml data. I've followed below resource [1] to generate PDF form ad able to create non editable PDF. But i need to create Interactive PDF.

Is it possible to create Interactive PDF using XDP & XML data. If so, Please let us know the API we can use.

[1]: https://helpx.adobe.com/aem-forms/6-3/aem-document-services-programmatically.html [Refer: Output Service section]

Thanks In Advance

Siva

1 Accepted Solution

Avatar

Correct answer by
Level 8

You're attempting to created an interactive XFA based PDF form.  Are you going to be trying to load this in a browser?  If so you'll run into issues, you may want to look at rendering the form as HTML5 or using Adaptive Forms.  Let me know which direction you want to go.

View solution in original post

5 Replies

Avatar

Level 10

Output service used to have a parameter that resulted in the PDF being interactive or not.

Avatar

Community Advisor

smacdonald2008​, you mean we can use OutputService itself to generate interactive PDF? Please correct me if i'm wrong.

I couldn't find any parameter which can passed to the output service API to define PDF being interactive or not. It would be great if you can provide me more details on this.

Thanks

Siva

Avatar

Level 10

I was going off memory - looks like i was thinking old Forms service. Output was for printing, etc.

AA22.png

Avatar

Community Advisor

Thanks a lot @smacdonald2008​ for the information.

I'm writing AEM servlet to generate Interactive PDF. But I see in the document, ServiceClientFactory object is created using Connection properties.

As we are using AEM servlet, Do we need to  Create a ServiceClientFactory object using connection properites?

If not, can we just get the ServiceClientFactory object using @Reference ?

Properties connectionProps = new Properties();

            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_SOAP_ENDPOINT, "http://[server]:[port]");

            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL);          

            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");

            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");

            connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");

             

            //Create a ServiceClientFactory object

            ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);

Please advise.

Avatar

Correct answer by
Level 8

You're attempting to created an interactive XFA based PDF form.  Are you going to be trying to load this in a browser?  If so you'll run into issues, you may want to look at rendering the form as HTML5 or using Adaptive Forms.  Let me know which direction you want to go.