Search code examples
jspdf

Improve Jspdf quality


when we use addHTML(), generated pdf quality is poor.

To improve quality, I write this code.

            var pdf = new jsPDF('l', 'in', 'a4');
            pdf.internal.scaleFactor = 30;
            pdf.addHTML($('#print-area')[0], function () {
                pdf.save(calendarName);
            });

This may help someone


Solution

  • when we use addHTML(), generated pdf quality is poor.

    To improve quality, I write this code.

            var pdf = new jsPDF('l', 'in', 'a4');
            pdf.internal.scaleFactor = 30;
            pdf.addHTML($('#print-area')[0], function () {
                pdf.save(calendarName);
            });
    

    This may help someone