6

page break is not correct in table ##

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.cell(margins.left, margins.top, margins.width,table);
    pdf.fromHTML(document.getElementById('editor'),
    // pdf.fromHTML(source,
    margins.left, // x coord
    margins.top,
    { // y coord
        'width': margins.width // max width of content on PDF
        //'elementHandlers': specialElementHandlers

    },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);
};

In the case of small contents it is fine. Page break in a bigger cell content is not correct. How can i fix this?

this is the generated pdf this is the generated pdf

How can i solve this....any idea..

sarath
  • 163
  • 1
  • 11

0 Answers0