Posted 4 August 2021, 9:31 pm ESTWe are receiving the following error.
Image is not created or loaded into a GcBitmap. at GrapeCity.Documents.Imaging.GcBitmap.SetDpi(Single dpiX, Single dpiY)
using (var gchtml = new GcHtmlRenderer(html))
using (GcBitmap b = new GcBitmap())
gchtml.RenderToGcBitmap(b, new HtmlToImageFormat(true, true)
WindowSize = new Size(414, 896), // size of browser window
DefaultBackgroundColor = Color.Empty, // this will be inferred from the HTML
MaxLeftMargin = 125,
MaxRightMargin = 125
b.SetDpi(300); // default resize pixel width and height is proportionate to 300DPI taken from google page found
using (var resizedBitmap = Resize(b, new Size(650, 5610)))
The contents of the html variable is attached
We are using NuGet libraries:
1. GrapeCity.Documents.Html version: 188.8.131.523.
2. GrapeCity.Documents.Html.Windows.X64 version: 184.108.40.2063
3. NetStandard.Library version 2.0.3
Please can you advise as to what is wrong with the above code.
NOTE: This code works for most HTML, but not others, like the attached file