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

237
Vistas
Jspdf height of PDF not working for images with long height
    var img = new Image();
    img.src = "data:image/jpeg;base64,/......" ;
var doc = new jsPDF();
var width = doc.internal.pageSize.getWidth;
var height = doc.internal.pageSize.getHeight;
 doc.addImage(img, 'JPEG', 0, 0, width, height);
  doc.save('img.pdf'); 

I am using above code to currently convert images into pdf long images like this https://cdn.black-clover.org/file/sugois/Reality-Quest/Chapter-1/03.jpg doesn't gets its height in pdf it only shows a part of image in pdf, any way to get its full height content while keeping the width on same ratio, you can check the demo by compiling the code above. Thanks in advance. You can check the fiddle here:- https://jsfiddle.net/5v91exfs/

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