Open EdoardoCroci opened 5 months ago
I have a react project with pdfmake added by yarn, a component draws a chart (svg) using d3, I use an id to get the svg. This is how I get the svg and add it to an empty document:
const svgElement = document.getElementById('svgConcrete'); const svgString = svgElement.outerHTML; const docDefinition = { content: [ { columns: [ { width: '*', text: '' }, { svg: svgString, width: 175, height: 175 }, { width: '*', text: '' }, ] } ], }
The image that should be displayed is this:
The image that I get is:
Why does this happen? How can I fix it?
I have a react project with pdfmake added by yarn, a component draws a chart (svg) using d3, I use an id to get the svg. This is how I get the svg and add it to an empty document:
The image that should be displayed is this:
The image that I get is:
Why does this happen? How can I fix it?