Can we use PDF Generator with in aem sites? | Community
Skip to main content
shridhar_sahu
Level 3
Oct 17, 2019 3:25 PM UTC
Solved

Can we use PDF Generator with in aem sites?

I have a use-case in which i need to generate PDF from HTML page using URL.

I have sample Landing page which accepts a url-encoded parameter id

At the time of page load an ajax call gets triggered and some html gets rendered dynamically through jquery based on that url parameter.

I have to use using webpage link((www.example.com/mypage.html?id=1)) for generating pdf from HTML.

Also,  Can we achieve the use-case using pdf generator without using AEM Forms?

Adobe Experience Manager Help | Converting files using PDF Generator

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Oct 18, 2019 12:16 PM UTC

The server never sees the complete page, as it is combined in the browser out of two or more assets; thus rendering on the server would require that the server starts a browser, and executes all the javascript to trigger the ajax call and embedd the returned value somehow into the DOM, so it can be finally rendered into the PDF.

I guess that this is somehow possible (you have to have an embedded browser like phantomjs or such), although I am not sure if the PDF generator can handle that case directly.

5 replies

joerghoh
joerghohAccepted solution
Employee
Oct 18, 2019 12:16 PM UTC

The server never sees the complete page, as it is combined in the browser out of two or more assets; thus rendering on the server would require that the server starts a browser, and executes all the javascript to trigger the ajax call and embedd the returned value somehow into the DOM, so it can be finally rendered into the PDF.

I guess that this is somehow possible (you have to have an embedded browser like phantomjs or such), although I am not sure if the PDF generator can handle that case directly.

Translate
shridhar_sahu
Level 3
Oct 18, 2019 5:36 AM UTC

I have a landing page built on AEM 6.4 Sites which accepts url parameter id

(www.example.com/mypage.html?id=1)

At the time of page load a ajax call get triggered and appends some html with in landing page through javascript.

Can we generate pdf of the landing page(www.example.com/mypage.html?id=1) using pdf generator?

Translate
joerghoh
Employee
Oct 17, 2019 7:39 PM UTC

I don't understand what you need to render as PDF. Is it something the server produces or is the page to be rendered completed in the browser?

Translate
Level 3
Oct 17, 2019 4:36 PM UTC

You need to purchase Document Services.

Translate
Ankur_Khare
New Participant
Oct 17, 2019 4:23 PM UTC