String HTML to create pdf file in AEM OSGI service/ sling servlet | Community
Skip to main content
December 2, 2021

String HTML to create pdf file in AEM OSGI service/ sling servlet

  • December 2, 2021
  • 1 reply
  • 768 views

Please help me with best approaches to write HTML string to PDF file

Thanks in advance

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

1 reply

Kiran_Vedantam
Community Advisor
Community Advisor
December 2, 2021

Thanks for the question @rnaveen2 

 

I have recently implemented similar use-case in my project. We have used headless chrome 

 

chrome --headless --disable-gpu --print-to-pdf https://www.chromestatus.com/

https://developers.google.com/web/updates/2017/04/headless-chrome

 

You can pass your HTML to headless chrome in the place of URL and save it.

 

Thanks,

Kiran Vedantam.