sorry for the late reply, didn't have time to check it.
found the issue, the html snipped you are using has relative width of 75%, in this case the html layout tries to take as much space as possible and because image rendering, unlike control, has no width limit it tries to create image that is too large, resulting in GDI+ error.
the simplest solution is to specify maxWidth as the second parameter to RenderToImage.
I will also add a safeguard in code so the final image will be limited to 4096, unless specific max width limit is provided.
found the issue, the html snipped you are using has relative width of 75%, in this case the html layout tries to take as much space as possible and because image rendering, unlike control, has no width limit it tries to create image that is too large, resulting in GDI+ error.
the simplest solution is to specify maxWidth as the second parameter to RenderToImage.
I will also add a safeguard in code so the final image will be limited to 4096, unless specific max width limit is provided.