Hyphen space BUG using jspdf
Somebody knows how to solve this space bug ?
Only copy the code below, paste and save as .html and download the jspdf used plugins.
This problem occurs only if use hyphen. Any other character works with no problem.
Thanks !!!
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<script src='require.js'></script>
<script src="jspdf.js"></script>
<script src="context2d.js"></script>
<script src="html2canvas.js"></script>
<script src="canvas.js"></script>
<script src="standard_fonts_metrics.js"></script>
<script src="html2pdf.js"></script>
<script>
function goPDF()
{
require ( ['./js/jspdf/html2pdf'], function()
{
var obj = document.getElementById("div_pdf");
var html = obj.innerHTML;
var params =
{
orientation : 'p',
unit : 'pt',
format : 'a4'
};
var pdf = new jsPDF(params, '', '');
html2pdf ( html, pdf, function()
{
pdf.output('dataurlnewwindow');
}); // html2pdf
}); // require './js/jspdf/html2pdf'
} // goPDF()
</script>
</HEAD>
<BODY>
<a href="javascript:goPDF()">Generate PDF</a>
<div><span style="font-family:courier;font-size:8pt">04.234-72</span></div>
<div id="div_pdf" style="visibility:hidden">
<div><span style="font-family:courier;font-size:8pt">04.234-72</span></div>
</div> <!-- div id="div_pdf" -->
</BODY>
</HTML>Discussão (0)
Carregando comentários...