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.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.