I am new to this library. I have an SVG that I am trying to save as a PDF. SVG renders fine. But when I try to run the SVG2PDF - I get the following error:
ERROR TypeError: m.saveGraphicsState is not a function at it (svg2pdf.min.js:24)
With the following code:
const svgElement = document.getElementById('svgelement');
const width = 300, height = 200;
// create a new jsPDF instance
const pdf = new JsPDF('l', 'pt', [width, height]);
// render the svg element
SVG2PDF(svgElement, pdf, {
xOffset: 0,
yOffset: 0,
scale: 1
});
pdf.save('myPDF.pdf');
I am new to this library. I have an SVG that I am trying to save as a PDF. SVG renders fine. But when I try to run the SVG2PDF - I get the following error:
ERROR TypeError: m.saveGraphicsState is not a function at it (svg2pdf.min.js:24)
With the following code: const svgElement = document.getElementById('svgelement'); const width = 300, height = 200;
Any ideas?
Thanks, Sheila