Generate image with background problem

Dec 5, 2014 at 1:48 PM
I am trying to generate an image from html with a background image, but it doesn't work for me.

My code is:
Dim bg As Image = My.Resources.paper
Dim image As Image = HtmlRenderer.WinForms.HtmlRender.RenderToImage(bg, html)
It gives me the error "Expression does not produce a value." Please help. Thank you.
Developer
Dec 5, 2014 at 4:10 PM
That's because this method doesn't return any value, it a compiler error.
this method doesn't use the given image as background to create another, it renders on top of the given image.
Dec 5, 2014 at 7:01 PM
I sort of got it to work. The background image is showing behind the rendered HTML, but it doesn't fill the entire background. It only fills a small portion of the upper-left area. The rest is just black. What am I doing wrong?
Feb 4, 2015 at 1:31 PM
nbrege wrote:
I sort of got it to work. The background image is showing behind the rendered HTML, but it doesn't fill the entire background. It only fills a small portion of the upper-left area. The rest is just black. What am I doing wrong?
@nbreg does your issue fixed? I am having same issue where my image is scaled to small size and html rendered on it but remaining area is just black.

@ArthurTep or @nbregv
Can you please give me a hint to sort-out the issue?

Thanks