AEM Forms - How to dynamically embed pdfs in XFA based xdp template at runtime. | Community
Skip to main content
nitin_seth
Level 2
December 15, 2022
Solved

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

  • December 15, 2022
  • 1 reply
  • 798 views

 

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
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SantoshSai

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

1 reply

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
December 15, 2022

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

Santosh Sai