Sharepoint list print to pdf using SPFx

Nagendra 121 Reputation points
2021-09-21T13:17:42.543+00:00

Hi,

We have multiple lists on our Sharepoint server 2019 site, here customer requirement is that they want the print image above the list and if user clicks on the print image need to generate a pdf file of that list.

Already we have created SPFx webparts for other requirements, so my plan is spfx webpart will use for this requirement also.

Please let me know which libraries need to use.

Thanks,
Nagendra.

Microsoft 365 and Office SharePoint Server Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-09-22T01:50:50.507+00:00

    Hi anonymous user-9029,

    You could use this jspdf library to generate PDFs: https://www.npmjs.com/package/jspdf

    And here is a good demo for your reference: https://github.com/dmitryrogozhny/sharepoint-lab/tree/master/export-to-pdf


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.