Skip to content

how to manage a bigger content on page break with jsPDF table  #1975

@sharathpm

Description

@sharathpm

Thank you for submitting an issue to jsPDF. Please read carefully.

Are you using the latest version of jsPDF?
jsPDF Version 1.0.272
Have you tried using jspdf.debug.js?
yes
Steps to reproduce
`function exportOne()
{
margins = {
top: 100,
bottom: 100,
left: 30,
width: 520,
right:30
};

var pdf = new jsPDF('portrait', 'pt', 'a4');
pdf.setDrawColor(0,0,0);
pdf.setTextColor("#954326");
pdf.setFontSize(25);
pdf.rect(20, 3, pdf.internal.pageSize.width -50 , pdf.internal.pageSize.height - 15 , 'S');
pdf.fromHTML(document.getElementById('editor'),
margins.left, // x coord
margins.top,
{ // y coord
    'width': margins.width // max width of content on PDF

},function(dispose)
{
headerFooterFormatting(pdf, pdf.internal.getNumberOfPages());
var iframe = document.createElement('iframe');
iframe.setAttribute('style','position:absolute;right:0; top:0; bottom:0; height:100%; width:650px; padding:20px;');
document.body.appendChild(iframe);
iframe.src = pdf.output('datauristring');
},
margins);
};`

Ideally a link too. Try fork this
download (1).pdf

What I saw

download (1).pdf

What I expected
I want to break the table contents inside in the margin and generate to the next page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions