Some UTF-8 encoded Unicode characters are rendered as empty rectangles in the html renderer. The sample code below . The sample below uses Mathematical Alphanumeric Symbols and produces the attached image file. This is using Aspose.HTML 24.7.
HTMLDocument doc = new HTMLDocument(β<html><body><br>πππ₯π₯π¨ ππππππ</body></html>β, β.β);
HtmlRenderer renderer = new HtmlRenderer();
ImageRenderingOptions options = new ImageRenderingOptions(ImageFormat.Jpeg);
MemoryStream screenshotStream = new MemoryStream();
ImageDevice idv = new ImageDevice(options, screenshotStream);
doc.RenderTo(idv);
File.WriteAllBytes(Path.ChangeExtension(Path.GetRandomFileName(), β.jpgβ), screenshotStream.ToArray());
If possible, can you please share the same content in shape of an .html file by adding it to .zip? We donβt think that copying the content from your post would help us see the original HTML in browser and how it should look in the converted PDF document. We are sorry for the trouble.
Sure, hereβs the html file in a zip. Note that the code converts to an image, not a pdf (jpg in the sample, but I tried png and bmp as well with the same results). AsposeUtfFailure.zip (190 Bytes)
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): HTMLNET-5693
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.