Expand my Community achievements bar.

AEM Sites 6.1 - HTML to PDF

Avatar

Level 2

Hello,

We are trying to use the OOTB functionality that generates a PDF file from a HTML page. I have read the topics in the forum and articles like http://www.cqblueprints.com/tipsandtricks/pdfrendering.html and we are able to generate a PDF by simply changing the extension from .html to .pdf. However, we would like to write custom XSL files and not override the default behavior, so we could configure the PDF output as we desire and also not impact other applications (shared instance). So, the rewriter would be looking at /libs/wcm/core/content/pdf/page2fo.xsl and looking at our XSL as well.

The mentioned page states that we have to change the XSLTTransformer class, but I do not know how and where nor if this would change the default behavior.

Have anyone had a similar scenario?

Regards.

1 Reply

Avatar

Level 1

Hi everbody, 

I have the same problem. I'm trying to use this functionality to generate a pdf from a HTML page with a customized 'page2fo.xsl'. I need to customized the file only  for my application because in the page there are some HTML tags that I don't want to display in pdf, like menu, header etc.

I saw the same article, and I don't know how can I modily the XSLTTransformer.

In my case I did some test with the rewriter packege below my own app packge. It's worked, but when I try to do the same configuration to another application, both use the same page2fo.xsl. In that case, the instance use the file with the higher priority (order property).

 

 

Thanks

Guilherme