Env. AEM 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 –
Views
Replies
Total Likes
For this use case, I propose the below solution:
As your final document will be a pdf file, so you can first render your xdp to pdf and then retrieve your pdf's files as mentioned in your XML file.
You need to create a ddx and pass the ddx to the assembler service.
How will you manage at which place to assemble certain pdf files coming dynamically in xml? Xml payload only have info about section after which pdf will be inserted.
Ddx and assembler logic works best when we know actual pdf pages.