question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multipage PDF using jsPDF.html() method

See original GitHub issue

Hi!

I’m trying to do next:

var doc = new jsPDF({ orientation: 'p', format: 'a4'  });
doc.html(document.getElementById('test'), {
   callback: function (doc) {
      doc.addPage('a4', 'p');
      doc.html(document.getElementById('test'), {
         callback: function (doc) {
            doc.output('dataurlnewwindow');
      }
   }
}

First page generated correctly, but second is always blank. Can it be fixed somehow?

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

4reactions
anishaswaincommented, May 21, 2019

Is this issue still active? I was facing the same error and had to do lot of customization to achieve the same. I would love to work on this feature.

0reactions
siddharthcn21commented, Dec 26, 2022

I am facing same issue. Does anyone find some solution or hack (work around) ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsPDF multi page PDF with HTML renderer - Stack Overflow
jsPDF multi page PDF with HTML renderer · 1. Hi guys is there any solution for this? – manipvd · What about single...
Read more >
Generate Multipage PDF using Single Canvas of HTML ...
Generate Multipage PDF using Single Canvas of HTML Document using jsPDF ... jsPDF is a nice library to convert HTML content into PDF....
Read more >
Converting HTML into Multi-page PDF using JavaScript library
The splitHTMLtoMultiPagePDF() the method applies auto splitting on the PDF document. It prepares the image canvas from the HTML document. Then ...
Read more >
How to add multiple pages in jspdf | jspdf tutorial | html to pdf
... of application here:https://webninjadeveloper.com/javascript/ jspdf -tutorial-to-add- multiple-pages -inside- pdf - document-in -browser-usi...
Read more >
Convert HTML/CSS Content to a Sleek Multiple Page PDF File ...
Read about integrating jsPDF into your browser based JavaScript web application and exporting generic HTML/CSS to PDF.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found