Jspdf: HTML Table Page Split Issue

Created on 26 Apr 2016  路  3Comments  路  Source: MrRio/jsPDF

I'm using jsPDF to export HTML tables to a PDF document but when a table splits between two pages, I see this issue:
screen shot 2016-04-25 at 11 57 03 pm

Does anyone know how I can fix this? Here is my code:

            var pdf = new jsPDF('p', 'pt', 'letter');
            source = $('#survey')[0];

            specialElementHandlers = {
                '#bypassme': function (element, renderer) {
                    return true
                }
            };

            margins = {
                top: 40,
                bottom: 20,
                left: 40,
                width: 522
            };

            pdf.fromHTML(
                source,
                margins.left,
                margins.top, {
                    'width': margins.width,
                    'elementHandlers': specialElementHandlers
                },

            function (dispose) {
                pdf.save('Survey_Report.pdf');
            }, margins);
cell.js

Most helpful comment

I have the same problem. If someone got the solution, please share!

All 3 comments

I have the same problem. If someone got the solution, please share!

We are closing this issue, because we will not support any longer fromHTML and addHTML.

Explaination:
We are working on a new html2pdf plugin, which will be based on html2canvas and our context2d plugin. This should lead to more reliable results for your projects. And it will give us the time to focus on the core functionality of pdf-generation because we will not use our energy for writing/supporting/extending 2 html plugins. If you still want to use addHTML or fromHTML you can still use jsPDF 1.4.1.

Best Regards

Have anyone resolved this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

liftarn picture liftarn  路  5Comments

Pinank picture Pinank  路  3Comments

mellisa0109 picture mellisa0109  路  3Comments

MelanieCroce picture MelanieCroce  路  4Comments

NoFootDancer picture NoFootDancer  路  3Comments