 ctx.fillStyle = '#ffffff';
                    ctx.fillRect(0, 0, canvas.width, canvas.height);
                    ctx.drawImage(this, 0, 0);
                    const imgData = canvas.toDataURL('image/jpeg', 0.95);
                    const pdf = new jspdf.jsPDF({
                        orientation: canvas.width > canvas.height
                            ? 'l'
                            : 'p',
                        unit: 'pt',
                        format: [canvas.width, canvas.height]
           