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

218
Views
How can I have like a base pdf with jsPDF

So I basically want to create a form and then when the person presses the button it will create a pdf with that info and with a already made pdf basically will fill the document but I cant make it work and also wanted to see the preview before exporting but dont work too

<!DOCTYPE html>
<html>
    <head>
        <title>JSPDF</title>
    </head>
    <body>
        <form id="form">
            <input type="number" id="day" placeholder="Dia"/>
            <input type="number" id="month" placeholder="Mês"/>
            <input type="text" id="nome" placeholder="Nome Completo"/>
            <button id="button">GenTest</button>
        </form>
    </body>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>

    <script>
        var form = document.getElementById('form')

        form.addEventListener('submit',function(event){
            event.preventDefault()

            var day = document.getElementById('day').value
            var month = document.getElementById('month').value
            var nome = document.getElementById('nome').value

            var doc = new jsPDF()

            doc.text(day,20,20)
            doc.save("cert.pdf")
        })
    </script>
</html>
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!