0

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?

  • What do you mean with 'an HTML Form', a SharePoint List item? Is this SharePoint Online or on-premise? Do you have the ability to deploy your own custom code, or 3rd party solutions? There are loads of different options, but all include custom coding or off-the-shelf 3rd party products. – Jeroen Ritmeijer - Muhimbi Dec 23 '18 at 17:57
  • We could go with third party paid solution but client will only pay one time. Not recurrently. – mohd tahir Dec 24 '18 at 12:33
  • For low volume there is a free version (SP Online, Flow, API) at muhimbi-online.com/Pricing (Disclaimer, I work on that product) – Jeroen Ritmeijer - Muhimbi Dec 26 '18 at 0:53
1

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:

pdfmake getstarted

Also you can play with this plug-in using below link:

pdfmake playground

Useful links:

  1. Generate PDF from HTML using pdfMake in Angularjs

Note: This is not a promotional answer. This is free and best plug-in to generate pdf files.

  • But I didn't see any option for using dynamic styling like bootstrap to generate the pdf. This is nice plugin but might not work for our scenario. – mohd tahir Dec 23 '18 at 10:57
1

The following JS plugins with source code for your reference.

html2pdf

jsPDF

PDF Converter Services Online

0

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.

0

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.

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.