import { jsPDF } from "jspdf"; export default async function lead({ }) { const doc = new jsPDF('p', 'pt', 'a4'); doc.setFontSize(12) doc.html(document.getElementById("dream-house-full"), { useCORS: true, autoPaging:'text', // html2canvas: callback: function (pdf) { pdf.save("12.pdf"); }, html2canvas: { scale: 0.5, // ignoreElements: element => element.id === autoTableConfig?.elementId, }, x:10, y:10, width:1400, }); // doc.save("a4.pdf"); // htmlPdf.create(html, options).then((pdf) => pdf.toFile('test.png')); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter