Convert HTML to PDF hangs with this margins

It is strange that my below unit tests will run forever for “HoNOS.html” if the margin has bottom and top both set to 10! I have tried these with two different dev’s environments and tried both latest version and 23.7.0 of Aspose.Pdf. What could be wrong?

[Test]
[TestCaseSource(nameof(GetOptionTestCases))]
public void ConvertHtmLtoPdfByFile(HtmlLoadOptions options, string fileName)
{
	Document pdfDocument = new Document(Path.GetDirectoryName(Assembly.GetAssembly(this.GetType()).Location) + $"\\{fileName}", options);
	pdfDocument.Save($"html_test_{fileName}.PDF");
}
private static System.Collections.IEnumerable GetOptionTestCases()
{
	var htmlFiles = new string[] { "HoNOS.html" };
	var options = new List<HtmlLoadOptions>() { new HtmlLoadOptions() };
	var pageOption = new HtmlLoadOptions
	{
		PageInfo =
		{
			Margin = new MarginInfo(72, 72, 72, 72) //new HtmlLoadOptions { PageInfo = { Margin = new MarginInfo(20, 10, 20, 10) } } };
		}
	};
	options.Add(pageOption);
	options.Add(new HtmlLoadOptions
	{
		PageInfo =
		{
			Margin = new MarginInfo(20, 11, 20, 10) //new HtmlLoadOptions { PageInfo = { Margin = new MarginInfo(20, 10, 20, 10) } } };
		}
	});
	options.Add(new HtmlLoadOptions
	{
		PageInfo =
		{
			Margin = new MarginInfo(20, 10, 20, 11) //new HtmlLoadOptions { PageInfo = { Margin = new MarginInfo(20, 10, 20, 10) } } };
		}
	});
	options.Add(new HtmlLoadOptions
	{
		PageInfo =
		{
			Margin = new MarginInfo(21, 10, 20, 10) //new HtmlLoadOptions { PageInfo = { Margin = new MarginInfo(20, 10, 20, 10) } } };
		}
	});
	options.Add(new HtmlLoadOptions
	{
		PageInfo =
		{
			Margin = new MarginInfo(20, 10, 21, 10) //new HtmlLoadOptions { PageInfo = { Margin = new MarginInfo(20, 10, 20, 10) } } };
		}
	});
	foreach (var option in options)
	{
		foreach (var htmlFile in htmlFiles)
		{
			yield return new TestCaseData(option, htmlFile);
		}
	}
}

The html in “HoNOS.html” is below:

<table style="width: 900px; font-size: 14px; font-family: Arial; border-collapse: collapse;" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td style="padding: 8px 0; font-weight: normal; color: #65c8d0; font-size: 20px; text-align: center; border: 1px solid #f6f6f6;">OUTCOME COLLECTION REPORT</td>
        </tr>
        <tr>
            <td style="padding: 10px 15px; border: 1px solid #f6f6f6; background: #fdfdfd;">
                <p style="font-size: 15px; margin: 0 0 12px 0; border-bottom: 1px dashed #eee; padding-bottom: 7px;">
                    <strong style="padding-right: 30px;"> HoNOS </strong>
                    <strong style="padding-right: 30px;"> 3/21/2024 3:43 PM </strong>
                    <strong>Complete </strong>
                </p>
                <div style="margin: 0px; float: left; width: 100%;">
                    <p style="margin: 0 0 5px 0;"><span style="width: 30%;">Source of Information</span> <span style="width: 70%;">: Client Records</span></p>
                    <p style="margin: 0 0 5px 0;"><span style="width: 30%;">Reason</span> <span style="width: 70%;">: Referral</span></p>
                    <p style="margin: 0 0 5px 0;"><span style="width: 30%;">Collection Status</span> <span style="width: 70%;">: Complete or Partially complete</span></p>
                </div>
            </td>
        </tr>
        <tr>
            <td style="padding: 10px 15px; border: 1px solid #f6f6f6; ">
                <p style="margin: 0 0 5px 0;"><strong> Jennifer Kidd </strong></p>
                <p style="margin: 0 0 5px 0;">27/12/1947 (76y)</p>
                <p style="margin: 0 0 5px 0;">9  Graham Ave,  BRANXHOLME VIC 3302</p>
                <p style="margin: 0 0 5px 0;">09564222194</p>
                <p style="margin: 0 0 5px 0;">createnewteam1@outlook.com</p>
            </td>
        </tr>
        <tr>
            <td style="padding: 10px 15px; border: 1px solid #f6f6f6;">                                     <div style="width: 35%; float: left; margin-bottom: 5px; "> 
                                         <div style="float: left; width: 35%; "> 
                                             <div style="float: left; padding: 0px 0 5px 4px; width: 100%; " > 
                                                 <strong>Score</strong> 
                                             </div> 
                                             <div style="font-size: 46px; margin: 0px 0 0 0; color: #55b7bf;float: left;line-height: 46px; width:100%; height:46px;">6</div> 
                                         </div> 
                                                                                                                                <div style="float: left; width: 100%; margin-top: 5px;">Lower is better</div> 
                                                                              </div> 
                                                                           <div style="width: 65%; float: left; margin-bottom: 5px;"> 
                                         <div style="float: left; width: 95%;"> 
                                             <p style="margin: 0px 0 5px 0; "> 
                                                                                   </p> 
                                         </div> 
                                     </div> 
                                     Complete or Partially complete </td>
        </tr>
        <tr>
            <td style="padding: 15px 15px; border: 1px solid #f6f6f6;"><table style="width: 100%; font-size: 14px; border-collapse: collapse; font-family: Arial;" cellpadding ="4" cellspacing ="0" > 
                                                <tbody> 
                                                <tr style="background: #fcfcfc; font-size: 14px; font-family: Arial;" >  
                                                    <td style="font -family: Arial; border: 1px solid #f6f6f6; font-weight: 600;" > Scale Name</td> 
                                                    <td style="font-family: Arial; border: 1px solid #f6f6f6; font-weight: 600; width: 150px; text-align: right;" > Score</td> 
                                                    <td style= "font -family: Arial; border: 1px solid #f6f6f6; font-weight: 600; width: 150px; text-align: right;">Maximum Score</td> 
                                                </tr>                                             <tr style="font-size: 14px; font-family: Arial;"> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6;">Behavioural Problems  
                                                                                                                                      (Lower is better) 
                                                                                     </td> 
                                            <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">1</td> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">12</td> 
                                            </tr> 
                                                                                 <tr style="font-size: 14px; font-family: Arial;"> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6;">Impairment  
                                                                                                                                      (Lower is better) 
                                                                                     </td> 
                                            <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">1</td> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">8</td> 
                                            </tr> 
                                                                                 <tr style="font-size: 14px; font-family: Arial;"> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6;">Symptomatic Problems  
                                                                                                                                      (Lower is better) 
                                                                                     </td> 
                                            <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">2</td> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">12</td> 
                                            </tr> 
                                                                                 <tr style="font-size: 14px; font-family: Arial;"> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6;">Social Problems  
                                                                                                                                      (Lower is better) 
                                                                                     </td> 
                                            <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">2</td> 
                                             <td style="font-family: Arial; border: 1px solid #f6f6f6; text-align: right;">16</td> 
                                            </tr> 
                                     </tbody> </table> 
                                    </td>
        </tr>
        <tr>
            <td style="padding: 15px 15px; border: 1px solid #f6f6f6;"><p style="font-size: 15px; margin: 0 0 12px 0; border-bottom: 1px dashed #eee; padding-bottom: 7px;">Questions Summary</p> 
                                             <ol style="padding: 0 0 0 20px; font-weight: bold;"><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Overactive, aggressive, disruptive behaviour Include such behaviour due to any cause, e.g., drugs, alcohol, dementia, psychosis, depression, etc.Do not include bizarre behaviour, rated at Scale 6</p><p style="margin: 0px; font-weight: normal;">No problems of this kind during the period rated.</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Non-accidental self-injury Do not include accidental self-injury (due e.g., to dementia or severe learning disability); the cognitive problem is rated at Scale 4 and the injury at Scale 5. Do not include illness or injury as a direct consequence of drug or alcohol use rated at Scale 3, (e.g., cirrhosis of the liver or injury resulting from drunk driving are rated at Scale 5).</p><p style="margin: 0px; font-weight: normal;">Fleeting thoughts about ending it all, but little risk during the period; no self-harm</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problem drinking or drug taking Do not include aggressive or destructive behaviour due to alcohol or drug use, rated at Scale 1. Do not include physical illness or disability due to alcohol or drug use, rated at Scale 5.</p><p style="margin: 0px; font-weight: normal;">No problem of this kind during the period rated</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Cognitive Problems (memory, orientation, understanding) Include problems of memory, orientation and understanding associated with any disorder: learning disability, dementia, schizophrenia, etc.Do not include temporary problems (e.g., hangovers) resulting from drug or alcohol use, rated at Scale 3.</p><p style="margin: 0px; font-weight: normal;">Minor problems with memory or understanding e.g., forgets names occasionally</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Physical illness or disability problems Include illness or disability from any cause that limits or prevents movement, or impairs sight or hearing, or otherwise interferes with personal functioning.Include side-effects from medication; effects of drug/alcohol use; physical disabilities resulting from accidents or self-harm associated with cognitive problems, drunk driving etc.Do not include mental or behavioural problems rated at Scale 4</p><p style="margin: 0px; font-weight: normal;">No physical health problem during the period rated</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problems associated with hallucinations and delusions Include hallucinations and delusions irrespective of diagnosis. Include odd and bizarre behaviour associated with hallucinations or delusions. Do not include aggressive, destructive or overactive behaviours attributed to hallucinations or delusions, rated at Scale 1</p><p style="margin: 0px; font-weight: normal;">Somewhat odd or eccentric beliefs not in keeping with cultural norms</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problems with depressed mood Do not include over-activity or agitation, rated at Scale 1. Do not include suicidal ideation or attempts, rated at Scale 2. Do not include delusions or hallucinations, rated at Scale 6</p><p style="margin: 0px; font-weight: normal;">No problems associated with depressed mood during the period rated</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Other mental and behavioural problems Rate only the most severe clinical problem not considered at items 6 and 7 as follows: specify the type of problem by selecting the appropriate letter in the list on the right: A phobic: B anxiety; C obsessive-compulsive; D stress; E dissociative; F somatoform; G eating; H sleep; I sex; J not specified elsewhere</p><p style="margin: 0px; font-weight: normal;">Minor non-clinical problems</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problems with relationships Rate the patient?s most severe problem associated with active or passive withdrawal from social relationships, and/or non-supportive, destructive or self-damaging relationships</p><p style="margin: 0px; font-weight: normal;">No significant problems during the period</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problems with activities of daily living Rate the overall level of functioning in ADLs: e.g., eating, washing, dressing, toilet, budgeting, and complex skills: e.g. organising where to live, occupation and recreation, mobility and use  of transport, shopping, self-development. Include any lack of motivation for using self-help opportunities. Do not include lack of opportunities for exercising intact abilitiies</p><p style="margin: 0px; font-weight: normal;">Minor problems only e.g., untidy, disorganised</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problems with living conditions Rate the overall severity of problems with the quality of living conditions and daily domestic routine. Are the basic necessities met (heat, light, hygiene)? If so, is there help to cope with disabilities and a choice of opportunities to use skills and develop new ones? Do not rate the level of functional disability itself, rated at Scale 10. NB: Rate patient?s usual accommodation. If in acute ward, rate the home accommodation</p><p style="margin: 0px; font-weight: normal;">Living conditions acceptable; helpful in minimizing disability and supportive of self-help</p></li><li style="margin-bottom: 15px;"><p style="margin: 0px; font-weight: bold; margin-bottom: 5px;">Problems with occupation and activities Rate overall level of problems with quality of daytime environment. Is there help to cope with disabilities, and opportunities for maintaining/ improving occupational/recreational skills? consider stigma, lack of qualified staff, access to supportive facilities, e.g., day centres, workshops, social clubs, etc. Do not rate the level of functional disability itself, rated at Scale 10. NB: Rate the patient?s usual situation. If in acute ward, rate activities during period before admission</p><p style="margin: 0px; font-weight: normal;">Minor or temporary problems, e.g., late pension cheques, times facilities available)</p></li></ol></td>
        </tr>
    </tbody>
</table><script type="text/template" id="trainingTooltipTemplate">
    <div class='popover tour'  style="min-width:350px;z-index:9999">
        <div class='arrow'></div>
        <h3 class='popover-title'></h3>
        <div class='popover-content'></div>
        <div style="padding:9px 14px;">
            <input type="checkbox" data-role="nevershowTraining" /> <span> Never show me any training overlay in the future</span>
        </div>
        <div class='popover-navigation' style="text-align:right;padding:10px;white-space:nowrap;">
            <div class="main-popover-nav">
                <button class='btn btn-danger' data-role='nothank'>No, thanks</button>
                <button class='btn btn-info' data-role='later'>Later</button>
                <button class='btn btn-info' data-role='guideme'>Next</button>
                <button class='btn btn-default' data-role='prev' style="display:none;">Next »</button>
                <!--<span data-role='separator'>|</span>-->
                <button class='btn btn-default' data-role='next' style="display:none;">« Prev</button>
                <button class='btn btn-default' data-role='replay' style="display:none;">Replay</button>
                <!--<span data-role='separator'>|</span>-->
                <button class='btn btn-default' data-role='end' style="display:none;">Got It</button>
            </div>
            <div class="extra-popover-nav" style="display:none;">
                <button class='btn btn-danger' data-role='disabletrainingfeature'>No, thanks</button>
            </div>
        </div>
    </div>
</script>
<script type="text/javascript">var moduleScope="MasterCare.OutcomeMeasure";var rootPath="/";</script><script src="https://demosportteams.mastercarecloud.com/modules/MasterCare.TrainingOverlay/scripts/bootstrap-tour-standalone.js" type="text/javascript"></script><script src="https://demosportteams.mastercarecloud.com/modules/MasterCare.TrainingOverlay/scripts/trainingoverlay.js" type="text/javascript"></script>

This topic has been moved to the related forum: Convert HTML to PDF hangs with this margins - Free Support Forum - aspose.com