Aspose.Pdf.Document Constructor fails w/ NullReferenceException when using specific fonts (e.g. Segoe Print)

Hi,

The following C# code snippet results in a NullReferenceException when calling the Aspose.Pdf.Document constructur:

byte[] contentBytes = Encoding.UTF8.GetBytes(mbContent);
using(MemoryStream ms = new MemoryStream(contentBytes))
{
  mailbodyDocument = new Document(ms, htmlLoadOptions);
}

The content of the variable mbContent is as follows:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Aptos;}
@font-face
	{font-family:"Segoe Print";
	panose-1:2 0 6 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Aptos",sans-serif;
	mso-ligatures:standardcontextual;
	mso-fareast-language:EN-US;}
span.E-MailFormatvorlage17
	{mso-style-type:personal-compose;
	font-family:"Aptos",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:11.0pt;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang="DE" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div><p style="margin:1pt 2pt 3pt 4pt;"><span style="font-family: Calibri;font-size:12.0pt;color:black;mso-fareast-language:DE-AT">Von:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Zoltan Krekus &lt;zoltan.krekus@kendox.com&gt;</span></p><p style="margin:1pt 2pt 3pt 4pt;"><span style="font-family: Calibri;font-size:12.0pt;color:black;mso-fareast-language:DE-AT">Gesendet:&nbsp;&nbsp;&nbsp;&nbsp;17.10.2024 08:38:52</span></p><p style="margin:1pt 2pt 3pt 4pt;"><span style="font-family: Calibri;font-size:12.0pt;color:black;mso-fareast-language:DE-AT">An:&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adele Vance &lt;AdeleV@368z6g.onmicrosoft.com&gt;</span></p><p style="margin:1pt 2pt 3pt 4pt;"><span style="font-family: Calibri;font-size:12.0pt;color:black;mso-fareast-language:DE-AT">Betreff:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test</span></p><p style="margin:1pt 2pt 3pt 4pt;"><span style="font-family: Calibri;font-size:12.0pt;color:black;mso-fareast-language:DE-AT">Anlagen:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;smime.p7s; </span></p><p style="margin:1pt 2pt 3pt 4pt;"><span style="font-family: Calibri;font-size:12.0pt;color:black;mso-fareast-language:DE-AT">&nbsp;</span></p></div><div class="WordSection1"><p class="MsoNormal"><span style="font-family:&quot;Segoe Print&quot;">Test Mail<o:p></o:p></span></p></div></body></html>

The exception seems to be caused because of the font ‘Segoe Print’:
<span style="font-family:&quot;Segoe Print&quot;">
Simpy changing the html tag to e.g.:
<span style="font-family:&quot;Calibri&quot;">
fixes the problem.

The font is locally installed in Windows.

Any help is appreciated,
Thanks

@zoltankrekus

Can you please make sure that you are using the latest version of the API? Also, please share complete stack trace information for the exception that you are facing so that we can further with the investigation.