Expand my Community achievements bar.

SOLVED

Generate PDF in AEM

Avatar

Level 3

 

 

Hello,

 

If we want to generate a PDF file for contract with some dynamic data as json. what is the recommended approach using AEM? 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If you are looking for a add-on or Adobe product to work with documentation, Adobe Experience Manager Guides is the solution.



Arun Patidar

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @foalowaini,

There are some options you may check and implement according to your best suite:

  • Flying Saucer [0].
  • Apache PDFBox [1].
  • Apache Velocity Engine [2] - Suits for dynamic data replacement with the placeholder. (Official Documentation [3])
    I have used this approach previously where we had to generate pdf with user filled forms and that data has to be rendered on pdf with actual data along with prefixes. eg First Name : ${customeName} 

[0]: https://labs.tadigital.com/index.php/2018/04/23/generating-pdf-from-html-in-adobe-experience-manager...

[1]: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/convert-aem-page-to-pdf/m-...

[2]: https://www.albinsblog.com/2015/04/how-to-send-html-email-using-velocity-adobecq5.html#.Y3ucHuzMLdo

[3]: https://velocity.apache.org/engine/

Hope that helps!

Regards,

Santosh

Avatar

Correct answer by
Community Advisor

If you are looking for a add-on or Adobe product to work with documentation, Adobe Experience Manager Guides is the solution.



Arun Patidar

Avatar

Level 5

You need to implement custom solution that can be supported by any Java implementation.

Sample Implementation can be found in below thread.

https://stackoverflow.com/questions/55315164/easiest-method-to-convert-json-to-pdf-in-java