Missing Space between first and second word for multi word hyperlink

Hi, When I convert the following HTML to a MS Word .docx file, a space is missing between the first and second word of the hyper link. In the example below, the hyper link should be “Family and Medical Leave Act of 1993”. You can see the space in the beginning of the text of the second hyperlink. Can you investigate with the following html? Thanks!

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="Aspose.Words for Java 16.12.0.0" />
<title></title>
<style type="text/css">
@page Section1 {
	size: 612pt 792pt;
	margin: 72pt
}

div.Section1 {
	page: Section1
}
</style>
</head>
<body>
	<div class="Section1 ng-scope">
		<p style="margin-top: 6pt; margin-bottom: 6pt; line-height: 16.8pt; background-color: #ffffff">
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">Current United States maternity leave </span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">policy is directed by the</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">&nbsp;</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);"></span>
			<a href="https://en.wikipedia.org/wiki/Family_and_Medical_Leave_Act_of_1993">
				<span style="font-family: Helvetica; font-size: 10.5pt; text-decoration-line: underline; color: rgb(11, 0, 128);">Family</span>
			</a>
			<a href="https://en.wikipedia.org/wiki/Family_and_Medical_Leave_Act_of_1993">
				<span style="font-family: Helvetica; font-size: 10.5pt; text-decoration-line: underline; color: rgb(11, 0, 128);"> and Medical Leave Act of 1993</span>
			</a>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">&nbsp;</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">(FMLA)</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);"> which includes a provision mandating 12 weeks of</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">&nbsp;</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; font-style: italic; color: rgb(37, 37, 37);">unpaid</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">&nbsp;</span>
			<span style="font-family: Helvetica; font-size: 10.5pt; color: rgb(37, 37, 37);">leave annually for mothers of newborn or newly adopted children.</span>
		</p>
	</div>
</body>
</html>

@Aillon,

Thanks for your inquiry. After an initial test with Aspose.Words 17.8, we were unable to reproduce this issue on our end. Please upgrade to latest version from following link:

We have also attached following documents here for your reference:

  • msw-2016.zip (9.3 KB): Generated using MS Word 2016
  • 17.8.zip (5.0 KB): Generated using Aspose.Words for .NET 17.8

In case you still observe the problem, please create a comparison screenshot highlighting (encircle) the problematic areas in this Aspose.Words generated DOCX file and attach it here for our reference. We will investigate the issue further on our end and provide you more information.

Best regards,

Thank you for your reply. I will try 17.8 Aspose words for Java. With regards to your attachment, the missing space now appears. However, there are extra spaces surrounding the hyperlink and the italicized word “unpaid”. Can you investigate, please?

Also, Please test/verify with Aspose Words for Java. Thanks!

@Aillon,

Aspose.Words for .NET 17.8 and Aspose.Words for Java 17.8 both behave the same in this case (see awjava-17.8.zip (5.1 KB)
).

This problem is present even when you open this HTML with browsers such as Google Chrome. MS Word 2016 generated Word file also contains this issue. So, this is an expected behavior and you may tweak your HTML to fix it. If we can help you with anything else, please feel free to ask.

Best regards,