1

What i would like to do, render a view maybe imageSave.cshtml.

It would contain javascript (Chart.js) when it is done running the javascript, i would like to take a screenshot, and then save it as an image to a blob server side

Is there any way to do so, without displaying it to the end user?

Mags
  • 57
  • 7
  • There are a good few tasks rolled up into one question there. For your sake break it down into manageable tasks. –  Oct 01 '19 at 12:42
  • Don't know how i should split it up. I know i a few tasks. but they are all intangled – Mags Oct 01 '19 at 12:45
  • Why would you use chart.js for that purpose ? There is a [class](https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.datavisualization.charting.chart?view=netframework-4.8) in dotnet that allows you to draw charts – Cid Oct 01 '19 at 12:47
  • @Cid i will give it a try – Mags Oct 01 '19 at 12:52
  • The chart.js already use canvas tag so it should be easy to get the content as a base64 and send to a server [check this SO answer](https://stackoverflow.com/questions/16792805/how-to-take-screenshot-of-canvas) – André Sanson Oct 01 '19 at 13:03

0 Answers0