Hi GemBox Team,
I have the following HTML document, that contains a style for the complete document for the font-size in rem:
<html>
<head>
<style>
html { font-size: 1rem; }
</style>
</head>
<body>
<p>Test</p>
</body>
</html>
Loading it as DocumentModel causes a StackOverflowException with this StackTrace:
at (⸮)
at +.(⸮)
at .(⸮, Double ByRef)
at (GemBox.Document.CharacterFormat, ⸮, Boolean, Boolean)
at .(, GemBox.Document.Section)
at .)
at .(System.IO.Stream, , System.Text.Encoding, System.String)
at .(System.IO.Stream, System.String, GemBox.Document.HtmlLoadOptions)(S
at GemBox.Document.HtmlLoadOptions.7k4lmxmhj5tk8h83eglk6fss34tasuhnystem.IO.Stream, System.String)
at GemBox.Document.DocumentModel.Load(System.String, GemBox.Document.LoadOptions)
at GemBox.Document.DocumentModel.Load(System.String)
Changing the unit of font-size (to “px” instead of “rem”) or the scope of the style (to “body” instead of “html”) avoids the exception.
I am using GemBox.Bundle in version 2025.3.134-hotfix.
Could you have a look at this behaviour?
Regards,
Sarah