• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

132
Vistas
JSPDF html2Cnavas descargar PDF no funciona en navegadores IOS

Estoy convirtiendo un DIV y lo descargo por html2Cnavas y JSPDF pero funciona bien en todos los navegadores pero no funciona en los navegadores IOS, ¿alguien puede ayudarme con esto, por favor?

codigo js

 $('#print').click(function (e) { e.preventDefault(); let HTML_Width = $(".report").width(); let HTML_Height = $(".report").height(); let top_left_margin = 1; let PDF_Width = HTML_Width + (top_left_margin * 2); let PDF_Height = (PDF_Width * 1.5) + (top_left_margin * 2); let canvas_image_width = HTML_Width; let canvas_image_height = HTML_Height; let totalPDFPages = Math.ceil(HTML_Height / PDF_Height) - 1; html2canvas($(".report")[0]).then(function (canvas) { let imgData = canvas.toDataURL("image/jpeg", 1.0); let pdf = new jsPDF('p', 'pt', [PDF_Width, PDF_Height]); pdf.addImage(imgData, 'JPG', top_left_margin, top_left_margin, canvas_image_width, canvas_image_height, 'FAST'); for (let i = 1; i <= totalPDFPages; i++) { pdf.addPage(PDF_Width, PDF_Height); pdf.addImage(imgData, 'JPG', top_left_margin, -(PDF_Height * i) + (top_left_margin * 4), canvas_image_width, canvas_image_height); } pdf.save("Report.pdf"); $(".html-content").hide(); });

});

almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda