jspdf-autotable

How to give width, height, x and y coordinates in generating pdf from html using JSPDF new html API

和自甴很熟 提交于 2019-12-02 07:21:25
I have been using JSPDF to generate pdf document based on some html. Earlier using jspdf fromHTML Api, we could give margins like this var margins2 = { top: 415, bottom: 10, left: 55, width: 300 }; doc.fromHTML(reactListContent, margins2.left, margins2.top, { 'width': margins2.width, 'elementHandlers': specialElementHandlers }, margins2); But, in the new .html API , how can i provide margins, width and height. The new API is like var pdf = new jsPDF('p', 'pt', 'letter'); pdf.html(document.getElementById('html'), { callback: function (pdf) { console.log("how to get margins"); } }); If you look