2
I’m starting to mess with the HTML/Javascript language now and I need to generate a pdf with a header, but I don’t know how, I just found code in php and I don’t know if it works.
2
I’m starting to mess with the HTML/Javascript language now and I need to generate a pdf with a header, but I don’t know how, I just found code in php and I don’t know if it works.
1
jsPDF
, try using it. Example:window.onload = function() {
var doc = new jsPDF();
doc.text(20, 20, 'Criando um cabeçalho.');
doc.setFont("courier");
doc.setFontType("normal");
doc.text(20, 30, 'Escrevendo num pdf.');
doc.save('Teste.pdf');
}
<script src="http://mrrio.github.io/jsPDF/dist/jspdf.min.js"></script>
Browser other questions tagged javascript pdf-generation
You are not signed in. Login or sign up in order to post.