Expand my Community achievements bar.

SOLVED

AEM Forms - How to dynamically embed pdfs in XFA based xdp template at runtime.

Avatar

Level 2

 

EnvAEM Forms 6.5 SP-12, On Prem

 

XML Payload for outputservice:

<RootElement>

<FirstName>FirstName</FirstName>

<FirstName>LastName</FirstName>.

.

.

<DocSource1>sampleContent1.pdf</DocSource1>

<DocSource2>sampleContent2.pdf</DocSource2>

<DocSource3>sampleContent3.pdf</DocSource3>

<DocSource4>sampleContent4.pdf</DocSource4>

</RootElement>

 

The above is the xml structure I am receiving as dynamic data to input XDP template. The Original SampleContent1,2,3,4.pdf exists in the file system. (Please note in XDP template these pdf will not be pre-built, We will get it like pdf files only).

I am using live cycle Designer to create XDP template and are using Document services (OutputService/ FormsService) of AEM 6.5 to generate the final pdf.

Document doc = outputService.generatePDFOutput(xdpTemplate, xmlDocument, outputOptions);

 

Here question is

  • How can I embed these pdfs (provided in xml input as above) in xdp template at run time.
  • Have anyone worked in the similar scenario and what are the possibilities for such use cases to be executed
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @nitin_seth ,

Appreciate if you post this question to the dedicated AEM Forms Community here to have better response: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/ct-p/adobe-experienc...

Good Luck!

Regards,

Santosh

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @nitin_seth ,

Appreciate if you post this question to the dedicated AEM Forms Community here to have better response: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/ct-p/adobe-experienc...

Good Luck!

Regards,

Santosh