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

307
Vistas
How can I set content height to fit a single pdf page?

I am using jspdf's html() method to convert an HTML string of an invitation to pdf.

The problem is that I don't know how to set the content height to fit in one pdf page, cause the generated pdf get split if the height is bigger than the pdf height and it's not looking good for an invitation.

Here is my code:

const doc = new jspdf('p', 'pt', 'a4');
let docWidth = doc.internal.pageSize.getWidth();

const htmlString = row.content;
await doc.html(htmlString, {
  callback: function(doc) {
    doc.save('file.pdf');
  },

  autoPaging: 'text',
  margin: [0, 0, 0, 0],
  width: docWidth,
  windowWidth: 1000,

})
over 4 years ago · Santiago Trujillo
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