Hacker News new | past | comments | ask | show | jobs | submit login

How does it compare to

Mozilla's PDF.js https://mozilla.github.io/pdf.js/


Parallax's jsPDF https://parall.ax/products/jspdf

PDF.js is a Portable Document Format (PDF) viewer.

jsPDF prints using:

    var doc = new jsPDF();
    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'

jsPDF 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!

jsPDF has a method called `addPage()` which adds a new page

Well, I have used PDF.js and it is great. I think it also has printable option.

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact