+ Start a Discussion
Ganesh Babu 8Ganesh Babu 8 

Lightning component renderAs PDF option

Hi,

In my lightning component, I want a button to download email template in PDF format. we have renderAs PDF option in VF page. Do we have similar option to download page/ template in PDF?

Thanks in Advance!! :)

Regards,
Ganesh.
 
Best Answer chosen by Ganesh Babu 8
James LoghryJames Loghry
Components are a completely separate set of tags and functionality than that of VF.  Perhaps someone else will correct me, but I don't believe this is supported in Lightning, at least yet.  Instead, you could either use a visualforce page that is rendered as a PDF and then reference that in your lightning component via javascript, or use a third party JavaScript PDF library such as https://parall.ax/products/jspdf

All Answers

James LoghryJames Loghry
Components are a completely separate set of tags and functionality than that of VF.  Perhaps someone else will correct me, but I don't believe this is supported in Lightning, at least yet.  Instead, you could either use a visualforce page that is rendered as a PDF and then reference that in your lightning component via javascript, or use a third party JavaScript PDF library such as https://parall.ax/products/jspdf
This was selected as the best answer
Prosenjit Sarkar 7Prosenjit Sarkar 7
yes you are right James. Salesforce Lightning does not supports pdf rendering right now. May be they will include it in further releases.

Thanks & Regards,
Prosenjit
Sarah DickinsonSarah Dickinson
Hi,

Were you able to make it work? I am trying to build a similar feature but I cannot find any documentation.

Thanks!!
Michael MMichael M
Is this possible nowadays?
Deepa SekarDeepa Sekar
Any update here on this ?
Shusen YiShusen Yi
Can it be done now or ,,,?