Answer the question
In order to leave comments, you need to log in
How to display y in js strings?
There is a function in js:
function getSVG(data) {
return svg = `<svg width="${width}" height="${height}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full">
<g>
<text x="${data.x}" y="${data.y}" font-family="${data.font_family}" font-size="${data.font_size}" fill="${data.font_color}">
${data.textValue}
</text>
</g>
</svg>`;
}
let pdfContent = [];
pdfContent.push({svg: getSVG(data)});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question