                           ? 'l'
                                        : 'p',
                                    unit: 'pt',
                                    format: [canvas.width, canvas.height]
                                });
                                pdf.addImage(imgData, 'JPEG', 0, 0, canvas.width, canvas.height);
                                pdf.save('mindmap.pdf');
                            };
                            img.src = 'data:image/svg+xml;base64,' + svgBase64;
        