const data = document.getElementById('containerDiv')!; html2canvas(data, { removeContainer: false }).then((canvas:any) => { const imgWidth = 208; const pageHeight = 295; const imgHeight = (canvas.height * imgWidth) / canvas.width; let heightLeft = imgHeight; let position = 0; heightLeft -= pageHeight; const doc = new jspdf('p', 'mm'); doc.addImage(canvas, 'PNG', 0, position, imgWidth, imgHeight, '', 'FAST'); while (heightLeft >= 0) { position = heightLeft - imgHeight; doc.addPage(); doc.addImage(canvas, 'PNG', 0, position, imgWidth, imgHeight, '', 'FAST'); heightLeft -= pageHeight; } doc.save('test.pdf'); });Tengo problemas de rendimiento con html2Canvas si hay varias páginas para representar. El navegador tarda más en descargar el pdf y se congela.