用于Html渲染器的JSPDF库?

时间:2013-07-05 18:20:47

标签: javascript html pdf pdf-generation jspdf

html渲染器需要什么JSPDF库?

function savePdf() {
$.getScript('Scripts/jspdf.js', function savePdf1() {

    var doc = new jsPDF();
    doc.text(20, 20, 'Hello world!');
    doc.text(20, 30, 'This is client-side Javascript, pumping out a PDF.');
    doc.addPage();
    doc.text(20, 20, 'Do you like that?');

    // Output as Data URI
    doc.output('datauri');

});

}

&安培;如何在上面的代码中使用多个Jspdf库?

1 个答案:

答案 0 :(得分:0)

您可以使用:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.debug.js"></script>