I have the following HTML code:
<!DOCTYPE html>
<html>
<body>
<p>don't print this to pdf</p>
<div id="pdf">
<p><font size="3" color="red">print this to pdf</font></p>
</div>
</body>
</html>
All I want to do is print to pdf everything found in the div with the id "pdf."
This must be accomplished with JavaScript.
The "pdf" document should then be downloaded automatically with the filename "foobar.pdf."
I've been using jspdf for this, however, its only function is "text," which only accepts string data.
I want to send HTML to jspdf rather than text.