Adding a PDF page to PDF using AEM Forms Assemble Service | Community
Skip to main content
Level 2
September 21, 2022
Solved

Adding a PDF page to PDF using AEM Forms Assemble Service

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-sync/).

 

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-sync/#section/Introduction).

 

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

Vijay_Katoch
Vijay_KatochAccepted solution
New Participant
September 21, 2022

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.

20 replies

Level 2
February 21, 2024

I am also facing the same problem please solve my problem also my website jobsrajasthan.com

Translate
Mayank_Gandhi
Employee
September 28, 2022

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

Translate
Level 2
September 29, 2022

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>

Translate
Mayank_Gandhi
Employee
September 29, 2022

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

Translate
Vijay_Katoch
Vijay_KatochAccepted solution
New Participant
September 21, 2022

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.

Translate
Level 2
September 21, 2022

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

Translate