This project is read-only.

Value cannot be null. Parameter name: parent

Nov 14, 2013 at 5:12 PM
When trying to use the RenderToImage function on a few different websites, I keep getting the error "Value cannot be null. Parameter name: parent".

Any suggestions?

This is basically what I am using to call and render the image:

Dim req As Net.HttpWebRequest = Net.WebRequest.Create(webURL)
            req.Timeout = 10000     ' 10 secs

            Dim localWebResponse As Net.HttpWebResponse = req.GetResponse()

            Dim encoding As System.Text.Encoding = System.Text.Encoding.GetEncoding(1252)

            Dim localResponseStream As System.IO.StreamReader = New System.IO.StreamReader(localWebResponse.GetResponseStream(), encoding)

            Dim HTML As String = localResponseStream.ReadToEnd

            Using img As System.Drawing.Image = HtmlRenderer.HtmlRender.RenderToImage(HTML, 850, 1100)
Nov 14, 2013 at 7:03 PM
It is probably an error in parsing the html.
Can you post example of html you get the error on so I will be able to reproduce it.
Nov 14, 2013 at 7:14 PM
Attached is a sample HTML file taken from a website that exhibits the error in the render. I have had this error occur with multiple unrelated websites:
Nov 15, 2013 at 9:51 AM
I'm sorry, I don't see where you attached the html..
Nov 15, 2013 at 4:02 PM
For some reason the attachments are not coming through when replied via email. Anyway, if you go to this url and save the HTML, that is basically what I am trying to process:

Also I have tried several other websites, and the get the exact same error with a few of them.
Nov 16, 2013 at 12:45 PM
As i though it's a parsing but, I will fix it in next minor release.
Note though that HTML Renderer is not powerful enough to render the generally complex web sites like the one in your link.
you may have to find a way to use WebBrowser control for your scenario.