Render CSS Border Styles around DIV within a DIV during HTML to Word DOCX Document Conversion using C# .NET

Good Afternoon,

We currently are using Aspose.Word version 19.7 and having issues were css borders in style classes are not rendered properly in div with child div tags. The perimeter of the border does not expand around the whole outer div

Here is the HTML

<div class="formborder">
        <div class="HEADER2">
            Tests Requested:
            <table cellspacing="0" cellpadding="0" width="100%">
                <tbody>
                    <tr>
                        <td width="20%"><input type="checkbox" style="" />  test</td>
                        <td width="20%"><input type="checkbox" style="" /> test</td>
                        <td width="20%"><input type="checkbox" style="" /> test</td>
                        <td width="20%"><input type="checkbox" style="" /> test</td>
                        <td><input type="checkbox" style="" /> test </td>
                    </tr>
                     <tr>
                        <td><input type="checkbox" style="" /> testr</td>
                        <td><input type="checkbox" style="" /> testr</td>
                        <td><input type="checkbox" style="" />  testr</td>
                        <td><input type="checkbox" style="" /> testr</td>
                        <td><input type="checkbox" style="" /> testr</td>
                    </tr>
                    <tr>
                        <td><input type="checkbox" style="" /> testr </td>
                        <td><input type="checkbox" style="" /> testr</td>
                        <td><input type="checkbox" style="" /> testr</td>
                        <td><input type="checkbox" style="" /> testr</td>
                        <td><input type="checkbox" style="" /> testr</td>
                    </tr>

		</tbody>
	    </Table>
	</div
</Div	

Here is the CSS classes

.formborder{
                border:thin;
                border-style: solid;
                border-color: black;
                padding: 15px;
                margin: 1px;
                width: 100%;
}

.header2 {
 	font-family: Calibri, Arial, sans-serif;
	font-size: 12pt;
	letter-spacing: 1px;
	font-weight: bold;
	color: #000000;

}

Thank you for help
-Alex

@aklo,

Are you converting HTML file (or string) to Word formats such as DOCX, DOC , RTF etc?

Please ZIP and attach the following resources here for testing:

  • Your simplified HTML file containing the CSS
  • Aspose.Words 20.7 generated output Word file showing the undesired behavior
  • Your expected file showing the desired output. You can create expected file by using MS Word or any other editor.

As soon as you get these pieces of information ready, we will start investigation into your scenario and provide you more information.

Thank you for your reply, Attached in the .zip file is the html, css, generated word doc, and the .png of the desired resultNotePrintStyles.zip (40.8 KB)
s. Just to note we are using Aspose 19.7

@aklo,

While using the latest 20.7 version of Aspose.Words for .NET, we have managed to reproduce this issue on our end. We have logged this issue in our bug tracking system with ID WORDSNET-20805. Your thread has also been linked to this issue and you will be notified as soon as it will get resolved. Sorry for the inconvenience.

Good Morning,

Did your team find a resolution to this issue?

-Alex

@aklo,

WORDSNET-20805 is currently pending for analysis and is in the queue. We will inform you via this forum thread as soon as this issue will get resolved in future or any more updates may be available. We apologize for any inconvenience.

The issues you have found earlier (filed as WORDSNET-20805) have been fixed in this Aspose.Words for .NET 22.6 update also available on NuGet.