Expand my Community achievements bar.

SOLVED

Adding a PDF page to PDF using AEM Forms Assemble Service

Avatar

Level 3

I have a use case where I have two PDFs.

1- Static PDF 

2- Dynamic PDF, generated using AEM Form Communication API (https://developer.adobe.com/experience-manager-forms-cloud-service-developer-reference/api/output-sy....

 

Ask -

I would like to insert static PDF pages after page 2 of Dynamic PDF(generated using communication API) using Document manipulation APIs (https://developer.adobe.com/experience-manager-forms-cloud-service-developer-reference/api/assembler...).

 

Any sample code or DDX file, if this can be done?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Try this:

<PDF result="doc1.pdf">
<PDF source="doc2.pdf" pages="1-2"/>
<PDF source="doc3.pdf
<PDF source="doc2.pdf" pages="3-5"/>
</PDF>

 

You can use <NoXFA/> tags inside dynamic pdf.

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Try this:

<PDF result="doc1.pdf">
<PDF source="doc2.pdf" pages="1-2"/>
<PDF source="doc3.pdf
<PDF source="doc2.pdf" pages="3-5"/>
</PDF>

 

You can use <NoXFA/> tags inside dynamic pdf.

Avatar

Level 3

That is what I tried and want to know in case there are other alternatives. Thanks

Avatar

Employee Advisor

@vidhyabhushanbahl what's the current approach? Where are the two pdf placed as of now?

Avatar

Level 3

Hi @Mayank_Gandhi 

I have done like this.

<PDF result="doc1.pdf">
<PDF source="doc2.pdf" pages="1-2"/>
<PDF source="doc3.pdf
<PDF source="doc2.pdf" pages="3-5"/>
</PDF>

Avatar

Employee Advisor

@vidhyabhushanbahl that's a very hard-coded way, where do you have the PDF from IC? if you need dynamic use workflows or servlet