3 ms·
PDF.js is a Portable Document Format (PDF) viewer. jsPDF prints using: var doc = new jsPDF(); doc.setFontSize(40); doc.text(35, 25, "Paranyan love
by hliyan 11y ago
PDF.js is a Portable Document Format (PDF) viewer.
jsPDF prints using:
var doc = new jsPDF();
doc.setFontSize(40);
doc.text(35, 25, "Paranyan loves jsPDF");
doc.addImage(imgData, 'JPEG', 15, 40, 180, 160);
Pdfmake on the other hand:
var dd = {
content: [
'First paragraph',
'Another paragraph, this time a little bit longer to make sure, this line will be divided into at least two lines'
]
}
- z3t4 11y agojsPDF doesn't trim each line like Pdfmake does. Pdfmake however supports new pages, witch jsPDF doesn't. Would be cool if Pdfmake didn't trim the lines!
- alexbilbie 11y agojsPDF has a method called `addPage()` which adds a new page
- XCSme 11y agoWell, I have used PDF.js and it is great. I think it also has printable option.