Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

AEM 6.5.21 Create PDFs from static HTML(with inline CSS) programatically as a DAM asset

Avatar

Level 4

In AEM 6.5.21 we require to create PDFs from static HTML(with inline CSS) programatically as a DAM asset.
We have an endpoint that gives text/html response HTML(with inline CSS).


Have tried PDFBox but it displays the html content as text in the PDF. 

1 Accepted Solution

Avatar

Correct answer by
Employee

@akashdeepAEM I would recommend using the  https://developer.adobe.com/document-services/docs/apis/#tag/Html-to-PDF/operation/pdfoperations.ht...and then write the asset to the DAM using the Assets API / utilities.

View solution in original post

4 Replies

Avatar

Community Advisor

Avatar

Level 10

hi @akashdeepAEM

Under the assumption of installing wkhtmltopdf on the machine running AEM, you can also test and evaluate this option:

https://experience-aem.blogspot.com/2019/06/aem-65-workflow-step-to-generate-pdf-of-sites-page-durin... 

Avatar

Correct answer by
Employee

@akashdeepAEM I would recommend using the  https://developer.adobe.com/document-services/docs/apis/#tag/Html-to-PDF/operation/pdfoperations.ht...and then write the asset to the DAM using the Assets API / utilities.

Avatar

Administrator

@akashdeepAEM Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni