Download AEM page content including images(banners) as a pdf

Avatar

Avatar

jitendram639832

Avatar

jitendram639832

jitendram639832

21-10-2020

Hi,

I am looking for a solution where AEM page content including images(banners) can be converted into pdf and pdf can be downloaded for end user by clicking on "Download PDF" button.

AEM page content data is generated dynamically after fetching data from some API and images are configurable on the page.

 

Thanks,

Jitendra

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

santhosh_kumark

Avatar

santhosh_kumark

santhosh_kumark

22-10-2020

Hi @jitendram639832 ,

 

  1. As @sachinarora mentioned in forum https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/convert-aem-page-to-pdf/qa...
  • You can add a query parameter in URLs of a page like /home.html?print=page. In Javascript you can give a condition to run window.print() in case print == page.It will automatically pop up a window for user to save it as PDF or print page.

  • Add media rule in CSS for print to control content that needs to be added in PDF. Reference URL

   2.  As @Arun_Patidar suggested,

Regards,

Santosh

Answers (1)

Answers (1)

Avatar

Avatar

TUmesh

Avatar

TUmesh

TUmesh

21-10-2020

Hi @jitendram639832 ,

Please see the old community article on below URL for almost same requirement.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/generating-pdf-from-html-i...

Hope this will help.

Regards

Umesh Thakur