Hello OnlyOffice team!
Environment: onlyoffice/documentserver:9.2.1 (deployed via Docker)
We are experiencing rendering differences between ONLYOFFICE and MS Word when working with the same DOCX file. The document layout differs specifically in pagination and table row rendering.
To investigate the root cause, we took the original DOCX file, renamed it to ZIP, extracted its contents, and inspected word/document.xml. The XML fragments below come directly from that file. Based on this analysis, we believe the issue is related to how ONLYOFFICE processes these specific elements. We would appreciate your feedback on whether our understanding is correct.
Case 1: Vertical Merge (vMerge) causes unwanted page break
In a table, we have a cell with <w:vMerge w:val="restart"/>. The row has a small fixed height:
<w:trPr>
<w:trHeight w:val="42"/>
</w:trPr>
The second column contains the text “test info 123” inside a merged cell:
<w:tc>
<w:tcPr>
<w:tcW w:w="2995" w:type="dxa"/>
<w:vMerge w:val="restart"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>test info 123</w:t>
</w:r>
</w:p>
</w:tc>
- MS Word renders the row on a single page, automatically expanding the row height to fit the content.
- ONLYOFFICE does not expand the row and moves the content to the next page, breaking the expected layout.
Case 2: <w:lastRenderedPageBreak/> is interpreted differently
We have two paragraphs. The second paragraph contains a <w:lastRenderedPageBreak/> tag inside a run, right before the text:
<w:r>
<w:rPr>...</w:rPr>
<w:lastRenderedPageBreak/>
<w:t>«test info 456...</w:t>
</w:r>
- MS Word treats this tag as a rendering hint and recalculates the layout. As a result, the text starting with «test info 456…» is moved to the next page.
- ONLYOFFICE keeps this text on the same page as the previous paragraph, causing a page layout mismatch.
Question: Beyond these specific cases, is there any configuration, setting, or option in onlyoffice/documentserver:9.2.1 that improves overall compatibility with MS Word rendering? We would like ONLYOFFICE to display DOCX files as closely as possible to how MS Word renders them — ideally with minimal manual intervention.
Thank you.