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

316
Vistas
jsPDF Show line above and beneath table

Can you tell me how to add a blue line above and beneath the table with jsPDF like in the example here? I have problems with the documentation (https://github.com/simonbengtsson/jsPDF-AutoTable) and can't modify the header.

Link to desired outcome

//export table to pdf
function generatePDF() {
  var doc = new jsPDF('p', 'pt', 'a4');

  doc.setFontSize(14);
  doc.text("Title of Diagram and Table", 40, 45);
  
  var elem = document.getElementById('table_with_data');
  var data = doc.autoTableHtmlToJson(elem);
  doc.autoTable(data.columns, data.rows, {
    margin: {left: 35},
    margin: {top: 70},
    theme: 'plain',
    alternateRowStyles: { fillColor: [246, 246, 246] },
    tableWidth: 'auto',
    fontSize: 8,
    overflow: 'linebreak',
    }
  );
    
 
  doc.save('results.pdf');
}
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