PDF Generation packages

Hi All. I have several div sections within my web page and I’m looking to introduce a ‘share’ feature. When activated the share feature would enable the user to email a PDF version of the div content. Can anyone recommend a suitable tool for this? Keep in mind that this would be client-side. thanks.

I’ve looked at PDFMake which does have a client-side pdf generation feature however you need to ‘build’ the PDF template via s bespoke API. Ideally I’m looking to pass-in HTML code and have it rendered using the existing template context.


1 Like

What about this package http://mrrio.github.io/jsPDF/ you can install it via bower.

Thanks XTA, this is the one I’m looking at right now. I would need to use the fromHTML() method, I’ve just learnt that all the formatting is lost though, I’m fast coming to the conclusion that there may not be an easy way round this :slightly_smiling:

I’ve checked various solutions for this and I ended up using pascoual:pdfkitx, but it’s server-side only (why you need it to be client side when it will need to send the PDF via email?), and it doesn’t render HTML, you have to manually position/style your text/images, so it may not suit your needs.