Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda