How can I convert HTML to PDF in pure JS
Does this work?
It was one of the top Google results.
Thank you, but this utilizes jQuery I want a pure JS solution.
I don’t know that there is a way to do it while avoiding any other technologies.
I was just going to say this
I dont know if you can do it without involving query
Hello there.
You could probably, if you know JS well, just take what @JeremyLT linked, and translate the jQuery into pure JS. It is very little code. Especially, since you do not need the “Helper Plugin”.
Hope this helps
You can trivially replace the jQuery code in it. But you can’t trivially replace the two other libraries – jspdf and html2canvas. You can rewrite these in plain JS rather than using the libraries, if thats absolutely necessary, but if youre reasonably skilled you’ll need to put aside something between few weeks and a few months to write the code