Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Page Content to PDF

Avatar

Level 2

Hi,

I was trying to convert page content into PDF, I searched a lot but couldn't find any exact results. Can anyone share an idea to convert page content to PDF. And need to convert many pages with different designs to PDF. Initially i tried Apache AOP , even though its giving 500 internal server error while accessing the URL with .pdf extension.

Any reference URL would be appreciated.

Thanks,

Mohamedh Nishadh

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

ootb it is possible to render a PDF. Internally it is using FOP. Please have a look at /libs/cq/config/rewriter in your AEM instance and /libs/wcm/core/content/pdf/page2fo.xsl for the XSL. I also found [1].

When you want to have features which go beyond FOP I would recommend to use Livecycle and/or AEM forms, which should also include the PDF Generator.

[1] http://stackoverflow.com/questions/24415396/apache-fop-using-cq5

View solution in original post

5 Replies

Avatar

Level 10

One of the best ways to get AEM content into PDF is to use AEM and LiveCycle ES. See:

https://helpx.adobe.com/experience-manager/using/integrating-livecycle-cq-applications.html

As you see here - AEM content is passed to LC where a PDF/A document is created. 

If your requirement is to build professional looking PDF documents - this may be something to explore. 

Without LC ES - you need to build a custom PDF service. You then pass the data to the PDF Service that creates a PDF document. See:

https://helpx.adobe.com/experience-manager/using/creating-custom-experience-manager-pdf.html

Avatar

Correct answer by
Employee Advisor

Hi,

ootb it is possible to render a PDF. Internally it is using FOP. Please have a look at /libs/cq/config/rewriter in your AEM instance and /libs/wcm/core/content/pdf/page2fo.xsl for the XSL. I also found [1].

When you want to have features which go beyond FOP I would recommend to use Livecycle and/or AEM forms, which should also include the PDF Generator.

[1] http://stackoverflow.com/questions/24415396/apache-fop-using-cq5

Avatar

Level 2

Ok thanks for you quick response. I really appreciate it. Is it possible to access the same page from .html to .pdf

Avatar

Level 1

Hi All,

I am using the OOTB XSL file to verify the working of creating pdf from html pages but when i am trying with we-retail pages, i am getting internal server error(500).

It is only working with geometrixx pages.

Could anyone help me to get to know what all factors are responsible to create PDF from html pages.

Please expedite the info.

Best Regards,

Aman

Avatar

Employee Advisor

Of course the structure of the XSLT is tied to the HTML spit out by Geometrixx. You probably need to adjust it the script to make it work for we retail or your application as well.