Hi Joshua!
Basically, we inform the url we want to be converted to image and insert the image into the PDF. And we have two variations of the problem:
1) The situation presented above, it crashes on line 827 of th class Syncfusion.HtmlConverter.HtmlConverter, version 6.3.1.8.
2) When instantiating the Syncfusion.HtmlConverter.HtmlConverter has the error on line 1103, SetUIHandler method because the browser (m_webBrowser.GetOcx ()) did not return any value.
These two conditions prevent the system we are developing is approved.
using (Syncfusion.HtmlConverter.HtmlConverter html = new Syncfusion.HtmlConverter.HtmlConverter())
{
using (System.Drawing.Image img = html.ConvertToImage(url, ImageType.Metafile, (int)width, -1, AspectRatio.KeepWidth))
{
PdfImage metafile = (PdfMetafile)PdfImage.FromImage(img);
doc.PageSettings.Height = img.Height;
format.SplitTextLines = true;
metafile.Draw(page, new System.Drawing.RectangleF(0, 0, pageSize.Width, -1), format);
}
}
Thanks.
HtmlConverter_663d2873.rar