This requires additional tools, Sling does not come with an automated HTML -> PDF transformer but you can probably look into http://xmlgraphics.apache.org/fop/ to convert XML -> PDF with the help of XSL-FO. XML can be easily generated with Sling scripting languages. Konrad
> On 26. Oct 2021, at 14:07, Nicola Cisternino <[email protected]> wrote: > > Hi all > I've an html resource (e.g. "pagecontent.html" stored in "apps" JCR structure > and mapped as sling:resourceType in a "content" node (e.g. > /content/test/page1). > So, using a browser, a request of: http://localhost:8080/test/page1 returns a > text stream containing html tags ... while a request of > http://localhost:8080/test/page1.html is normally parsed and correctly > displayed. > Can Sling return a PDF rendering of my HTML resource? (something like > http://localhost:8080/test/page1.pdf... or > http://localhost:8080/test/page1.html.pdf) > Thanks a lot. >
