System.NullReferenceException when converts from html to pdf

Using the font attached in the zip , when convert form html to pdf System.NullReferenceException is thrown.
I attached a code sample, the html and the fonts
Thank you
htmlsample.zip (103.4 KB)

codesample.zip (152.0 KB)

@esteban.soba.dfin

We installed the fonts that you shared and tested with below code using 24.8 version of the API. We were not able to replicate the issue that you have mentioned. Can you please make sure that you have installed the fonts?

Document doc = new Document(dataDir + "index.html", new HtmlLoadOptions
{
    IsEmbedFonts = true,
    DisableFontLicenseVerifications = true
});


doc.Save(dataDir + "output_aspose.pdf");

output_aspose.pdf (77.4 KB)

It is not necessary to install the font.
Just run the new code I sent
If you want to install the file you must remove the font declaration and change the font family
This html should reproduce the issue

new_codesample.zip (194.8 KB)

Here it is just the html
index.zip (209 Bytes)

@esteban.soba.dfin

Can you please share the error stack trace and exception message with us as well that you are noticing in your environment.

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Aspose.PDF
StackTrace:
at #=zvfR3CPqNl9G$t8O18bW0oLsWsNVRC9gPidRxiW0=.#=zPtbVSR$WK87v(#=z6ss$tFWys62S9r0ITOkgx5YDyOqr2aS7Kg== #=zVH4R0T0=, #=zni4V1gPJNoxj4ZS3YNtuY2wVF7b6EWUGFF8Pnv0= #=zmrCQJhc=, String #=zTc5zzCA=)
at #=zvfR3CPqNl9G$t8O18bW0oLsWsNVRC9gPidRxiW0=.#=zyK33tmF8Z$Vf(#=z6ss$tFWys62S9r0ITOkgx5YDyOqr2aS7Kg== #=zVH4R0T0=, #=zni4V1gPJNoxj4ZS3YNtuY2wVF7b6EWUGFF8Pnv0= #=zmrCQJhc=, String[] #=zE0VZ6HLy68oO)
at #=zvfR3CPqNl9G$t8O18bW0oLsWsNVRC9gPidRxiW0=.#=z2BxT48gTrDn06K6Ylg==(#=z6ss$tFWys62S9r0ITOkgx5YDyOqr2aS7Kg== #=zVH4R0T0=, #=zni4V1gPJNoxj4ZS3YNtuY2wVF7b6EWUGFF8Pnv0= #=zmrCQJhc=, Char #=zJk1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jd7egBMQYrX_0P91M0BbCRvzsOZvg==.#=zHdgwnQWhClXM(#=zzb6XojtzUBx8ZgsLhNW1eEQ= #=ziEJ85EQ=, #=zdhfE_93zKZmfDeOh_lttwkAftZyZ #=za9F2U69BJNbKpunkdA==, #=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, #=zy13JnvaDAeTBq$d1t7x2Uc8XCRQx #=zrBQMwwc=, #=zG2U4XF5bhbS0_ACkPshfoYxyv9qI_$g8Pe0SWmg= #=zJpJlQUBSgcPauWr5BFhrw90=, #=ze4bS164eVlz126dXS61S9No= #=zXFVKpL8gOeKK7kFoyw==)
at #=z6_HW$jd7egBMQYrX_0P91M0BbCRvzsOZvg==.#=zhinSpi8=(#=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, #=zy13JnvaDAeTBq$d1t7x2Uc8XCRQx #=zrBQMwwc=)
at #=zy13JnvaDAeTBq$d1t7x2Uc8XCRQx.#=zhinSpi8=(#=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=)
at #=zSCoOUsdbmTN1cx5ALSqX8GJlYKzccdnfwg==.#=zpoLl0Aw=()
at #=zSCoOUsdbmTN1cx5ALSqX8GJlYKzccdnfwg==.#=zVxc58CU=()
at #=ztmFjTeWqYofAZGFVCwBJn93OElxq.#=z9ceNAsanSjH4(#=zl1VgbLoMTP_wivye2RIa8B4= #=zMz2U3e7M0rP4AzD_eA==, #=zy13JnvaDAeTBq$d1t7x2Uc8XCRQx[] #=zD24N4z7nioKH, #=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, CancellationToken #=zTQ_FLUs=)
at #=zemg3Kp51n9iDLAC_e7AhO_ez$4h.Render(#=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, CancellationToken #=zTQ_FLUs=, #=zpR7vFZ$yRiwmcemXCmiHuI=[] #=zI14ZkS4=, #=zzb6XojtzUBx8ZgsLhNW1eEQ=[] #=zPeh6agY=)
at #=zemg3Kp51n9iDLAC_e7AhO_ez$_4h.Render(#=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, TimeSpan #=zc$rxGFg=, #=zZ0UfAmNxFO9xUrHHzSaWqwc=[] #=zpDCuKBQ=)
at #=zmCzGF3Lluoc4yGVJl2cB0ytPbSZG.Render(#=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, #=zxJoklsM= #=zlnI$Y8E=, TimeSpan #=zc$rxGFg=)
at #=zmCzGF3Lluoc4yGVJl2cB0ytPbSZG.Render(#=z1uems4cV0DMumqrdwvNgokKiER1H #=z6LdqTbk=, #=zxJoklsM= #=zlnI$Y8E=)
at #=z8KvcYQAzoKQEzOClJFnTJj_nZG47.#=zSxQ9isMOY21K(Stream #=zK8Vxt7UR7ODA, Document #=z7c2cr$JTlCrd, HtmlLoadOptions #=zun64xN2KDxS0, String #=zlMl8y9mD9gML)
at #=z8KvcYQAzoKQEzOClJFnTJj_nZG47.#=zoyLXZS8=(Stream #=zK8Vxt7UR7ODA, Document #=z7c2cr$JTlCrd, HtmlLoadOptions #=zun64xN2KDxS0, String #=zlMl8y9mD9gML)
at #=z8KvcYQAzoKQEzOClJFnTJj_nZG47.#=zoyLXZS8=(Stream #=zK8Vxt7UR7ODA, Document #=z7c2cr$JTlCrd, HtmlLoadOptions #=zun64xN2KDxS0)
at Aspose.Pdf.Document.#=zcnPeIZk=(Stream #=zy_rXrXs=, LoadOptions #=zv2YcrK8=, Boolean #=zfE3p75uBkgZp)
at Aspose.Pdf.Document.#=zcnPeIZk=(Stream #=zy_rXrXs=, LoadOptions #=zv2YcrK8=)
at Aspose.Pdf.Document…ctor(String filename, LoadOptions options)
at Program.$(String[] args) in C:\Users\rsoba\Downloads\new_codesample\AsposeSample\AsposeSample\Program.cs:line 4

@esteban.soba.dfin

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): PDFNET-58128

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.

The issues you have found earlier (filed as PDFNET-58128) have been fixed in Aspose.PDF for .NET 24.11.

I tested using the same example upgrading the Aspose.Pdf to the latest version and the error continues

System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Aspose.PDF
StackTrace:
at #=z77WmDKEKcVN967xKgAdPTmDjINsLNAWhaUe7Dxs=.#=zldHoLUobA5v9(#=zPm$b2hDoK2HP8PouA92zTUImXysWoiOZrw== #=zXslGd4A=, #=z21k6LCh22XD00aeCV3sT1MUxU5f4TG_llDZFtYA= #=zJpljNSM=, String #=zrlxpAEg=)
at #=z77WmDKEKcVN967xKgAdPTmDjINsLNAWhaUe7Dxs=.#=zs5N07PwbpKFQ(#=zPm$b2hDoK2HP8PouA92zTUImXysWoiOZrw== #=zXslGd4A=, #=z21k6LCh22XD00aeCV3sT1MUxU5f4TG_llDZFtYA= #=zJpljNSM=, String[] #=z8Z8uxDf04GdK)
at #=z77WmDKEKcVN967xKgAdPTmDjINsLNAWhaUe7Dxs=.#=zz7P$cjUVmegfyzhVhg==(#=zPm$b2hDoK2HP8PouA92zTUImXysWoiOZrw== #=zXslGd4A=, #=z21k6LCh22XD00aeCV3sT1MUxU5f4TG_llDZFtYA= #=zJpljNSM=, Char #=zXypVfp0=, #=zSmCyEP0UzxpE& #=zQvNd$Rs=)
at #=zeGbtS2Y7NISk382uXryBUvxZ$I_iaasDFQ==.#=z88cRF0QR7h_C(List1 #=zDH3TAAukjzPx) at #=zse1W8ncrJwuPSAPPUNwcIVD3eLb3JrioTw==.#=zlwlQd$k76vFu(List1 #=zDH3TAAukjzPx)
at #=zjKbu2Q7NJDiYg1q5p3XJMkyX8J9XbYeSIWO6i8E=.#=zxiDSzgJW3DNM()
at #=zjKbu2Q7NJDiYg1q5p3XJMkyX8J9XbYeSIWO6i8E=.#=zf4ZC4ppweKUf(#=zvpeHFXgoNX2C1xuBDXD_lsUmeIQF3vATXg== #=zuON3Pz0=)
at #=zjKbu2Q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==)
at #=zid5olNE3No9jbcf2netRF1ADPmPIZm2v$g==.#=zkSkSpxs=(#=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=, #=zT7O8PnTJ$q8Yw3iO9Uz_lU9ZghOW #=zKw9iLMA=)
at #=zT7O8PnTJ$q8Yw3iO9Uz_lU9ZghOW.#=zkSkSpxs=(#=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=)
at #=zUVelWnsYWMxk9liuZ6aJiwDSzm_cEuyBug==.#=z3eSz1ao=()
at #=zUVelWnsYWMxk9liuZ6aJiwDSzm_cEuyBug==.#=zgS7RnOw=()
at #=zFQuM3JOzo3krbgCB3dua3p$atJDi.#=zgGORlt7Lgdbc(#=zeoUH009O1JLBncBuEZqT_ME= #=z9xXKzGKmPrYaqkxoOw==, #=zT7O8PnTJ$q8Yw3iO9Uz_lU9ZghOW[] #=zTGM3pYo5fvXj, #=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=, CancellationToken #=zaQi4n0Y=)
at #=zLDbnkMx41nbBKeBgnD$y_TiYJs4v.Render(#=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=, CancellationToken #=zaQi4n0Y=, #=z080RC$Gqy_OURTn03EAeNEg=[] #=zIV4ULrs=, #=zgPfwrCTJLTOtbWAYUFm0oAI=[] #=zAQFMaZk=)
at #=zLDbnkMx41nbBKeBgnD$y_TiYJs4v.Render(#=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=, TimeSpan #=zyT3ghRw=, #=zUqe$u1CvhXf_BpP7HcLFQ1A=[] #=zPPC8OBU=)
at #=z08yh3R$qmbpBfegR3roKz$aGpWpe.Render(#=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=, #=ze8e6UIg= #=z8tzi7Fk=, TimeSpan #=zyT3ghRw=)
at #=z08yh3R$qmbpBfegR3roKz$aGpWpe.Render(#=z2cFaHQD5EmluqVtETC1qmQuGRdAy #=zbDYOPac=, #=ze8e6UIg= #=z8tzi7Fk=)
at #=zD8c8yScZUPK6_sS5pitRSz5Q5Kj2.#=zDO7JK3X0Jpsx(Stream #=znWLhNxf9oksN, Document #=zkcPEXXOA5BJp, HtmlLoadOptions #=zqBS6xssxsGa5, String #=zFNAqSh_dNQt4)
at #=zD8c8yScZUPK6_sS5pitRSz5Q5Kj2.#=zoyLXZS8=(Stream #=znWLhNxf9oksN, Document #=zkcPEXXOA5BJp, HtmlLoadOptions #=zqBS6xssxsGa5, String #=zFNAqSh_dNQt4)
at #=zD8c8yScZUPK6_sS5pitRSz5Q5Kj2.#=zoyLXZS8=(Stream #=znWLhNxf9oksN, Document #=zkcPEXXOA5BJp, HtmlLoadOptions #=zqBS6xssxsGa5)
at Aspose.Pdf.Document.#=ztczjL2o=(Stream #=zqgM6qfY=, LoadOptions #=zA3ot6IA=, Boolean #=zkm7R34IJminB)
at Aspose.Pdf.Document.#=ztczjL2o=(Stream #=zqgM6qfY=, LoadOptions #=zA3ot6IA=)
at Aspose.Pdf.Document…ctor(String filename, LoadOptions options)
at Program.$(String[] args) in C:\Users\rr831071\Downloads\new_codesample\AsposeSample\AsposeSample\Program.cs:line 4

@esteban.soba.dfin

We have reopened the ticket as per your feedback and will let you know after performing analysis.