Generate PDF in AEM | Community
Skip to main content
New Participant
November 21, 2022
Solved

Generate PDF in AEM

  • November 21, 2022
  • 3 replies
  • 1564 views

 

 

Hello,

 

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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

3 replies

New Participant
November 21, 2022

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

 

arunpatidar
arunpatidarAccepted solution
New Participant
November 21, 2022

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

Arun Patidar
SantoshSai
New Participant
November 21, 2022

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-6-1/

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

[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

Santosh Sai