const script = document.createElement('script'); script.src = 'https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js'; script.onload = () => console.log('html2pdf loaded'); document.body.appendChild(script);
const element = document.querySelector('.relative .flex-col .gap-1');
html2pdf().from(element).save('element.pdf');
No comments