Hi, I’ve come across a rendering issue when converting Word documents to fixed layout HTML.
The Word document uses “justify text” to format its paragraphs. When converted to fixed layout HTML, the rendering matches the one of the Word document, but copying the text in the HTML results in a selection where almost all whitespaces between words have been dropped.
Here’s a minimal reproduction document: justifiedText.docx (11.7 KB)
And here are some screenshots to help visualise the problem.
- Word: Screenshot 2021-05-07 at 15.06.49.png (69.9 KB)
- Fixed layout HTML: Screenshot 2021-05-07 at 15.07.14.png (18.6 KB)
- Copy/paste value: Screenshot 2021-05-07 at 15.09.23.png (15.0 KB)
Being able to select the text value from the HTML rendering is really important to us.
It seems to me that whitespaces are only inserted in the fixed layout HTML if the space between words in the Word document is more or equal to the space needed for a whitespace.
As all the words are absolutely positioned, it feels to me like there is no harm in appending a non-breaking whitespace
at the end of each word. If there is less than the required space for a whitespace between 2 words, the second word will simply slightly overlap over the whitespace.
Let me know if you require more details.
Thanks in advance.