First, I have to say that this library is just about the most awesome thing I have ever found. Being able to go directly from my complex HTML straight to an image without having to create an HTML File, then a PDF, then an image from the PDF.... is amazing.
I ran into the the AA issues that others have brought up with the HtmlRender.Render method, so I wanted to give HtmlRender.RenderToImage a whirl. No matter what I pass in, I get the following error message:
_"PInvokeStackImbalance was detected
Message: A call to PInvoke function 'HtmlRenderer!HtmlRenderer.Utils.Win32Utils::BitBlt' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."_
HERE IS MY METHOD INVOCATION: (the html is valid html, and .Render and .RenderToImageGdiPlus work, only they have aliased text)
Thank you!
-Andy
I ran into the the AA issues that others have brought up with the HtmlRender.Render method, so I wanted to give HtmlRender.RenderToImage a whirl. No matter what I pass in, I get the following error message:
_"PInvokeStackImbalance was detected
Message: A call to PInvoke function 'HtmlRenderer!HtmlRenderer.Utils.Win32Utils::BitBlt' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."_
HERE IS MY METHOD INVOCATION: (the html is valid html, and .Render and .RenderToImageGdiPlus work, only they have aliased text)
public void SaveHTMLToImage(string html, string filename)
{
Size MaxSize = new Size(500, 700);
var image = HtmlRender.RenderToImage(html, MaxSize);
image.Save(filename);
}
Any ideas as to what I might need to do to resolve the issue?Thank you!
-Andy