I used jQuery and jsPDF to generate PDF of the contents of a DIV p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script><divid="geraPDF">
[conteudo1]
[conteudo2]
[conteudo3]
</div>
<button class="btn btn-danger" id="btnPDF">Gerar PDF</button>
<script type='text/javascript'>
$(document).ready(function(){
$('#btnPDF').click(function() {
var doc = new jsPDF('landscape');
doc.addHTML($('#geraPDF'), function() {
doc.save("relatorio_pesquisa.pdf");
});
});
});
</script>
However, the generated PDF displays only part of the content, only [content1], [content2]. The [content3] is not being exported.
I believe that because the content is extensive, it is generating only one page and I do not know how to configure the parameters of jsPDF to give continuity in the number of pages, or page continuous, I have already read the content of the official website is devoid of information.