I have used chart.js to generate a report page that has multiple charts. I need to export this report to PDF. There are many solutions available via search, but I cannot find one which has multiple canvas elements.
The only available solution seems to be to loop through all the images, and recreate the report using the images, and then download that as a pdf.
Is there any simpler/more efficient way to accomplish this?
<body>
<h1> Chart 1 </h1>
<div style=width:800px; height:400px;>
<canvas id=chart_1 width=50 height=50></canvas>
</div>
<h1> Chart 2 </h1>
<div style=width:800px; height:400px;>
<canvas id=chart_2 width=50 height=50></canvas>
</div>
<h1> Chart 3 </h1>
<div style=width:800px; height:400px;>
<canvas id=chart_3 width=50 height=50></canvas>
</div>
</body>