Our tool uses Spire Doc library to convert a HTML page to Word document and vice versa. In this process we are observing that the font size of the bullet numbering and the spacing are getting changed during conversion. Below is what we are observing.
Consider the HTML page as below:
Here is the markup for the HTML page in our tool.
- Code: Select all
<div data-wrapper="true" dir="ltr" style="font-size:11pt"><div>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div><ol start="1" style="list-style-type:lower-roman"><li style="list-style-position: outside;">Et ultrices neque ornare aenean euismod elementum.</li><li style="list-style-position: outside;">Varius quam quisque id diam vel quam elementum. In arcu cursus euismod quis viverra.</li></ol><div style="list-style-position:outside">Mauris ultrices eros in cursus turpis massa tincidunt. </div></div>
We convert the HTML to Word using Spire Doc and everything is right at the first conversion.
But if we modify any content in the word document and convert the Word to HTML, the font of the bullet numbering gets changed to 12 (even though we set it as 11).
Here is the HTML markup produced by Spire Doc while the Word to HTML conversion of the changed content:
- Code: Select all
<div data-wrapper="true" style="font-size:11pt"><p style="margin-bottom:0pt; margin-left:0pt; margin-top:0pt; text-indent:0pt"><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span><span> Modified content.</span></p><p style="margin-bottom:0pt; margin-left:36pt; text-indent:-18pt"><span style="font-size:12pt">i.</span><span style="font-size:0.58em"> </span><span>Et ultrices neque ornare aenean euismod elementum.</span></p><p style="margin-left:36pt; margin-top:0pt; text-indent:-18pt"><span style="font-size:12pt">ii.</span><span style="font-size:0.58em"> </span><span>Varius quam quisque id diam vel quam elementum. In arcu cursus euismod quis viverra.</span></p><p style="margin-bottom:0pt; margin-left:0pt; margin-top:0pt; text-indent:0pt"><span>Mauris ultrices eros in cursus turpis massa tincidunt. </span></p></div>
After that if we again convert the HTML to Word, the font size of the bullet numbering and their spacing gets changed. The font size of the spacing is wrongly set as 6.5 (even though we always set everything as 11). This results in hanging indent in the word document. Below is the screenshot of the word document.