function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rupali Belpande 8Rupali Belpande 8 

Using LWC how to generate pdf and download it

VinayVinay (Salesforce Developers) 
Hi Rupali,

Check below examples to generate pdf and download it using lwc.

https://salesforcecodex.com/salesforce/generate-pdf-using-jspdf-in-lightning-web-component/
https://absyz.com/how-to-generate-a-pdf-using-jspdf-in-lwc/
http://santanuboral.blogspot.com/2020/10/lwc-generate-pdf.html

Please mark as Best Answer if above information was helpful.

Thanks,
Gabriel LinusGabriel Linus
Hey Rupali,

You can achieve Using LWC how to generate pdf and download it by simply creating a "Lightning Web Component (LWC)" along with a "Visualforce page:. Then, you can render the Visualforce page by making an Apex call from the LWC. This approach enables you to generate and facilitate PDF downloads seamlessly.

To implement this functionality, you can explore the article at https://arrify.com/generate-pdf-in-salesforce/. This comprehensive guide provides various methods for generating PDFs in Salesforce, including using Visualforce pages, leveraging Lightning Web Components (LWC) with Apex, and integrating third-party applications, all while following best practices.