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

297
Views
need jsPDF and html2pdf to create pdf and download it but no response

I need to create a function that turns webpages into a pdf file, then download it after a click function.

My function is

$('<script src="/webroot/help/jspdf.min.js"></script>').appendTo('head'); 
$('<script src="/webroot/help/html2pdf.js"></script>').appendTo('head'); 
var jsPDF = window.jspdf.jsPDF;   
var pdf = new jsPDF('1','pt','a4');
pdf.canvas.height=72*11;
pdf.canvas.width = 72*8.5;
html2pdf($("div[widgetname=DC]"),pdf,function(pdf){
    pdf.save('file.pdf');
});

I checked no downloads nor errors msg.

about 4 years ago · Juan Pablo Isaza
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!