Skip to main content
Level 2
Sep 21, 2022 10:41 AM UTC
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
Community Advisor
Sep 21, 2022 12:03 PM UTC

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.

13 replies

Vijay_Katoch
Community Advisor
Vijay_KatochCommunity AdvisorAccepted solution
Community Advisor
Sep 21, 2022 12:03 PM UTC

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
Sep 21, 2022 12:09 PM UTC

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

Translate
Mayank_Gandhi
Adobe Employee
Adobe Employee
Sep 28, 2022 3:16 PM UTC

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

Translate
Level 2
Sep 29, 2022 4:00 AM UTC

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
Adobe Employee
Adobe Employee
Sep 29, 2022 10:38 AM UTC

@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
Oct 5, 2024 2:05 AM UTC

Welcome to pmawasyojana2025.in your one-stop shop for thorough and trustworthy information about financial insights and government programs. Our goal is to make complicated policies and financial matters understandable to everyone. Washim, a seasoned blogger with a BA degree and over three years of experience in the yojana and finance area, founded our site. 

Translate
Oct 6, 2025 4:33 AM UTC

Thanks for sharing this solution, it was helpful! On a related note, while working on financial forms and PDF generation projects, I also came across some tools for LIC policy calculations. If anyone is interested, here’s a free LIC Calculator 

Translate
Oct 7, 2025 5:01 AM UTC

I am also facing the same problem. Please solve my problem also. My website LIC Calculator 

Translate
Level 1
Apr 6, 2026 12:29 PM UTC

I am also facing the same problem. Please solve my problem also.https://liccalc.com/

Translate