jsPDF pdf not capturing last html content due to height limits 14400

Viewed 328

I am using jsPDF with addHtml option below is the code snippet,

  var data = document.getElementById('datatoconvert');
  window.scrollTo(0, 0);
  var pdf = new jsPDF('p', 'pt', [data.offsetWidth,data.offsetHeight-data.offsetWidth]);
  var options = { pagesplit: true };
  var blobPdf
  let timeout = 55000;
  pdf.addHTML(data, options, () =>
  {
    setTimeout(() => {
      pdf.save("test.pdf");
    },timeout);
  })

But data gets cut at the end of pdf probably after height 14400 and getting warning in console like "A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400 "

0 Answers
Related