ControlBase.DrawToBitmap is obsolete. This method is not supported.

0
0

Hello,

The intellisense is showing that this method is obsolete and not supported.

What’s the other way to get a Bitmap representation of a UserControl ?

Thanks.

  • You must to post comments
0
0

It’s not really possible on the server. We’d have to run a hidden browser and pass back all the HTML from the client, including image links, session, etc.

It can be done on the client and send the image back, so the call DrawToBitmap() would have an async callback that receives the image from the client. This is probably better in an extension. A new library that does’t require to install any extension on the browser is this one: https://html2canvas.hertzen.com/ but it’s in beta and they say it’s still a bit limited.

Another way would be to use phantomjs but you’d need to spoof the session.

Another way is the new getUserMedia() but it needs a flag to be enabled on the browser.

So, it’s not an easy task.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.