-2

I have data wrapped in DIV And I'm interested in exporting them to PDF Using JSPDF

const openPdf=()=>{
  var doc = new JSPDF()
 html2pdf(document.getElementById("jsPdf"), pdf, function(pdf){
pdf.save('file.pdf');

}
<div id ="jsPdf">
  {
    res.map((file)=>{
  file.comment,
  file.title
  })
}
</div>

And I also want a page to go after each loop loop how do I do it?

programmer
  • 11
  • 1
  • 5
  • Duplicate! https://stackoverflow.com/questions/33748878/export-html-to-pdf-using-jspdf please use the search function to find similar questions before posting. – DevJ3rry Aug 12 '21 at 11:03

1 Answers1

-1

mpdf may be a good option to solve your problem

lvor
  • 11
  • 3