Word to HTML conversion - Overlapping characters in .NET

Converting the attached Word document to HTML with GroupDocs.Viewer 21.6 will produce some overlapping characters.
I have attached the output file as well, the issue gets better / worse depending on the zoom level in the browser.
Overlapping seems to happen when the font style change within the same line (e.g. color change, or bold font)
There were no special options used in conversion, just normal HTML conversion:

            var options = HtmlViewOptions.ForEmbeddedResources("output_viewer{0}.html");
            viewer.View(options);

Word overlapping characters.zip (60.6 KB)

@Clemens_Pestuka

When we opened the attached conversion output.html it looked fine on Windows 10 in Chrome/Edge/FF/IE browsers see in_chrome.png (26.6 KB). Could you please share how does it look like in your browser and what OS you’re using?

1 Like

@vladimir.litvinchik

That’s really surprising. For me it happens with Chrome and Firefox:
image.png (37.3 KB)

I’m using Windows 10 Version 10.0.19041.1052]
Did you generate the html again, or did you use the one I’ve provided?
Does it still look good if you zoom to 80%?
image.png (41.6 KB)

@Clemens_Pestuka

When I generated html again it was the same as the one you’ve sent p_1.zip (44.0 KB). When I zoom to 80% it seems to be OK in_chrome_zoom_80.png (50.1 KB). Can you please check if there any issues in the developer console (F12) and the antivirus if you have any is not blocking this file.

1 Like

@vladimir.litvinchik
Very strange problem… I tried it on another machine and there it was also find.
The file you generated is indeed the same as mine.
Development console was empty:
image.png (52.9 KB)

If the issue only happens on my machine, then it’s probably not so important.
I don’t really know what else I could check or do.
image.png (59.1 KB)
image.png (46.8 KB)

@Clemens_Pestuka

Thanks for sharing screenshots, we’ll investigate what can it be and let you know if there any findings.

1 Like

@Clemens_Pestuka

Can you please try enabling Clear Type if it’s disabled and checking if the issue still exists - Win + R, type cttune and follow the wizard?

1 Like

@vladimir.litvinchik

Yes this is it!
I would have never thought of that, thank you :slight_smile:

image.png (31.8 KB)
image.png (38.1 KB)

The issue disapears as soon as ClearType is active.

@Clemens_Pestuka

You’re welcome!

1 Like

@Clemens_Pestuka

The one question is still uncovered - why it happens that the text overlapping when ClearType is disabled. When rendering with default options the document is rendered to the fixed format where text is splitted into small parts with absolute positioning based on font properties. And when ClearType is disabled the font properties are different so we can see such issues.

So, this can be treated as a limitation or a specific behavior and the fix would be keeping ClearType enabled.

1 Like

@vladimir.litvinchik

Well if some customer complains about it, I’d for sure tell them first to activate ClearType.
But I do agree that it is a bit strange, why ClearType makes such a big difference.
Since it does not matter if ClearType is enabled or disabled on conversion time, it might also be a browser issue. Although it’s strange it happened for Firefox as well as Chrome.

Personally I have no problem with calling it a limitation, until someone starts to complain about it :smiley:

1 Like

@Clemens_Pestuka

Ok, got it. In case it becomes an issue you can try enabling HtmlViewOptions.RenderResponsive to render to responsive layout.

1 Like