Page Content to PDF | Community
Skip to main content
Nishadh
Level 2
October 16, 2015
Solved

Page Content to PDF

  • October 16, 2015
  • 5 replies
  • 2032 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

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

5 replies

smacdonald2008
Level 10
October 16, 2015

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

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

Nishadh
NishadhAuthor
Level 2
October 16, 2015

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

November 9, 2018

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

joerghoh
Adobe Employee
Adobe Employee
November 9, 2018

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.