Can we use PDF Generator with in aem sites? | Adobe Higher Education
Skip to main content
shridhar_sahu
Level 3
October 17, 2019
Resuelto

Can we use PDF Generator with in aem sites?

  • October 17, 2019
  • 5 respuestas
  • 3442 visualizaciones

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

Este tema ha sido cerrado para respuestas.
Mejor respuesta de joerghoh

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 respuestas

Ankur_Khare
Community Advisor
Community Advisor
October 17, 2019
Level 3
October 17, 2019

You need to purchase Document Services.

joerghoh
Adobe Employee
Adobe Employee
October 17, 2019

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?

shridhar_sahu
Level 3
October 18, 2019

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?

joerghoh
Adobe Employee
joerghohAdobe EmployeeRespuesta
Adobe Employee
October 18, 2019

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.