Is there a way to modify the exported PNG file with header, footer, stylings

Viewed 41

I have created a function which exports my canvas into PNG. As expected the downloaded file will show the chart, therefore I want to modify the file so that it contains header, footer a title etc. After I did some searching : const ctx = canvas.getContext('2d') as CanvasRenderingContext2D; ctx.font = fontHeight + 'px Arial'; ctx.textAlign = 'left'; ctx.fillStyle = 'red'; ctx.fillText(text, 0, fontHeight); I added this to my code and the problem is that the moment i click on the export button this text will not only show on the exported file but also on the canvas on my project. I want to find a way so that whenever I click the export button only the downloaded chart file will be modified. Thank you in advance!

0 Answers
Related