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

Adding a PDF page to PDF using AEM Forms Assemble Service

  • September 21, 2022
  • 12 replies
  • 2896 views

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?

Best answer by Vijay_Katoch

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.

12 replies

Mayank_Gandhi
Employee
September 28, 2022

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

New Participant
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>

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

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.

New Participant
September 21, 2022

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