Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
jsPdf creating blank pages after page filled with data

I am using jsPdf to create pdf. I am facing a problem, it is creating extra blank pages after creating pages filled with data. It is creating extra 4 to 5 blank pages.

const doc = new jsPDF({ format: 'a4' });
const source = document.getElementById("reports");
doc.setFont("arial", "normal");
doc.setFontSize(5);
doc.html(source, {
  callback: function(doc) {
    doc.save();
  },
  x: 10,
  y: 10,
  width: 140,
  windowWidth: 1000,
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Most probably your element proportions are not correct.

You can view this generate-pdf-from-react-html for correct use of styles and elements sizes.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!