+ Start a Discussion
System Admin 949System Admin 949 

Generating the Pdf using Lightning Components

Hi All,
I am trying to create the pdf form for using  Quote/any object details in salesforce.for this i am using lightning components.I am new to the lightning components.can any one provide the lightning material to learn lightning components perfectly.can provide the some sample code to create the lighting components to generate the Pdf for Quote object.
thanks in advance
Raj VakatiRaj Vakati

You cannt generated PDF by using lightning component direcly ..  use need to use the visualforce page and call its from the lightning exp ..

There are two methods to show a PDF in Lightning Component.
First, you can create a Visualforce page and embed it in the Lightning component. 
Second is, usage of PDF.JS library to directly use lightning component to display the PDF.

refer this links

Bhargavi TunuguntlaBhargavi Tunuguntla

You cannot directly generate PDF as we do in Visual force page using 'renderAs' But instead you can embed the visual force page in lightning component which inturns does the funtionality required.Please refer the below link:



Hope this will be useful.

amrita h 7amrita h 7
As of now i dont think thaere is feature exist to generate Pdf from lighting component. Here is an idea posted for the same. please upvote and help to get it done in the next releases.

Dhanik L SahniDhanik L Sahni

You can try below code for PDF generation  (https://salesforcecodex.com/salesforce/send-email-template-as-pdf-attachment-using-salesforce-apex/)

Thank You,