WebBrowser.DrawtoBitmap() generating blank images for few sites consistently

NLV picture NLV · Mar 18, 2011 · Viewed 13.5k times · Source

I've been using WebBrowser.DrawtoBitmap() in my asp.net page running in separate STA thread to capture web pages as an image. But I found that I'm getting blank images for few sites consistently. I'm aware that the method is not 'officially' supported but it would be nice if someone can provide me any reason or a work around for these blank images issue.

Answer

Stecya picture Stecya · Mar 18, 2011

DrawToBitmap has limitations and dont always work as expected. Try instead work with native GDI+

Here is example