1

I have a lightning component which displays list of accounts in table. And I need to create a button. On clicking , screenshot of the screen should be downloaded as PDF/excel file.

I am not sure how to proceed on this. I know I have to use JS library but don't really know how can I use this. Please let me know or provide any helpful links.

1

You will require jspdf in the lightning component. Include it with ltng:require and then call a function on the button click.

Here is the jsfiddle which you can have a look.

  • Can I ask you to explain bit more of any sample code. I am new to lightning and would need bit more help – devforce Jul 13 '18 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.