Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

PDF generation in AEM using fragments

Avatar

Level 2

Hello friends,

I am currently working on a task to create pdf files using content fragment in AEM version 6.2.

I can create a page using fragments and then can use PDF writer bundle to see page as pdf.

But also need to warn the user for the case when content fragments on page results in pdf more than 2 pages.

Could someone please advise how can I achieve this ?

Thanks,

Deepak

3 Replies

Avatar

Level 9

Hi,

Quick follow up questions: 

Do you want each page to be converted in PDF? Or Only fragments added in the page should be generated as PDF?

Avatar

Administrator

I would recommend you to please have a look at this article :- How do I Render a Page as PDF? | Adobe CQ (AEM) Blueprints

// How can I configure the PDF rewriter?

     The easiest method is to simply override the .xsl file used by default with CQ.  This is found in the repository at      /libs/wcm/core/content/pdf/page2fo.xsl.  Write the xsl-fo and the xslt the way you would normally.

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 2

This is not acceptable advice, even less so coming from Adobe staff! It's explicitly stated time and time again NOT to modify anything under /libs. This file was overwritten during a recent SP2 upgrade. Please beware.