JSFiddle - React, Tailwind, and code Playground
by Durtto
HTML
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://parall.ax/parallax/js/jspdf.js"></script>
<div id="render_me">
<div id="table">
<table id="StudentInfoListTable">
<thead>
<tr>
<th>Nome</th>
</tr>
</thead>
<tbody>
<tr>
<td>Eduardo</td>
</tr>
</tbody>
</table>
</div>
<a href="#">Download Arquivo</a>
JavaScript
var doc = new jsPDF();
// We'll make our own renderer to skip this editor
var specialElementHandlers = {
'#editor': function(element, renderer){
return true;
}
};
doc.fromHTML($('#render_me').get(0), 15, 15, {
'width': 170,
'elementHandlers': specialElementHandlers
});
//doc.save('Test.pdf');
$('a').click(function(){
doc.save('TestHTMLDoc.pdf');
});