I have got an html form in SharePoint. I need to generate a pdf from it on a button click. Any suggestions which approach to follow here?
We were having similar requirement in project and we used pdfmake plug-in which is very flexible and easy to use.
You can find it's documentation in below link:
Also you can play with this plug-in using below link:
Note: This is not a promotional answer. This is free and best plug-in to generate pdf files.
This is not be possible without using any third party service. I will suggest you find any third-party tools and this tools configured with SharePoint and then you can use it.
The client side libraries had page break issues with the SharePoint. I had to finally generate the pdf server side in an azure function and call this function from my content editor webpart.