Skip to main content
kalyan_chakrav1
Level 2
Sep 4, 2019 6:01 AM UTC
Solved

Need to download the current page

Hi,

As we have requirement when we click on the download icon it should get download the current page with styles,js,html and assets on the page.

Could you please share the sample code regarding the above use case and help me on this.

Thanks & Regards,

Kalyan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
antoniom5495929
antoniom5495929Accepted solution
Level 7
Sep 4, 2019 3:24 PM UTC

Hi,

probably you don't need to use some strange functionality but just implement this in front-end stuff.

You can use a javascript framework which allow you to download the page in a pdf format.

E.g. https://codepen.io/AshikNesin/pen/KzgeYX , check into this code that probably could be helpful for your requirement.

Let us know.

Thanks,

Antonio

6 replies

Umesh_Sondhi
Level 4
Sep 5, 2019 4:15 AM UTC

Hi

You can check this thread Convert AEM page to PDF

Translate
Employee
Sep 4, 2019 4:18 PM UTC
antoniom5495929
antoniom5495929Accepted solution
Level 7
Sep 4, 2019 3:24 PM UTC

Hi,

probably you don't need to use some strange functionality but just implement this in front-end stuff.

You can use a javascript framework which allow you to download the page in a pdf format.

E.g. https://codepen.io/AshikNesin/pen/KzgeYX , check into this code that probably could be helpful for your requirement.

Let us know.

Thanks,

Antonio

Translate
kalyan_chakrav1
Level 2
Sep 4, 2019 2:22 PM UTC

I need to download the page in pdf

Translate
Employee
Sep 4, 2019 1:18 PM UTC

You can leverage the page exporter utility[1] and download the page by changing ".html" to ".export.zip"

[1] The Page Exporter

Translate
Umesh_Sondhi
Level 4
Sep 4, 2019 6:58 AM UTC

Hi

Can you please tell which format u want .

thanks

Translate