Hi everyone,
We are encountering a critical text-rendering issue when converting .docx documents to .pdf using LibreOffice in headless mode within a Linux Docker container (Ubuntu/Debian-based base image).
The Problem: When a paragraph is justified (Justify) and contains Hebrew text (RTL) ending with a number (LTR) and a trailing punctuation mark (like a period . or comma ,), LibreOffice forces the punctuation mark onto a new line by itself.
In Microsoft Word on Windows, the punctuation remains correctly attached to the end of the number on the same line.
What we have tried so far (without success):
- Injecting
RLM(\u200F) or Word Joiner (\u2060) characters via OpenXML via C#. - Explicitly setting the
compatibilityModeto15(Word 2013+) insettings.xml. - Forcing
w:biditags on paragraph properties. - Installing/removing fonts (we made sure original Arial/David fonts are available, and removed
culmus/liberationto avoid font mapping issues).
It seems like the layout engine calculates a visual overflow during the justification stretching algorithm and treats the neutral punctuation as a line-break opportunity.
Is there a specific environment variable, command-line parameter, or a known bug/workaround regarding Bidi justification line-breaking logic for headless conversions on Linux?
Any advice would be highly appreciated! Thanks in advance