Hello,
The line-height is applied based on the twips. If documents are using a w:lineRule with atLeast value, then the line-height may be very low.
To prevent this, we recommend you to apply the following change:
In the TransformDocAdvHTML.php file, go to the addPprStyles method, and instead of:
if ($pprStyle->hasAttribute('w:line')) {
$styles .= 'line-height: ' . $this->htmlPlugin->transformSizes($pprStyle->getAttribute('w:line'), 'twips') . ';';
}
You can use:
if ($pprStyle->hasAttribute('w:line')) {
if (!$pprStyle->hasAttribute('w:lineRule')) {
$styles .= 'line-height: ' . $this->htmlPlugin->transformSizes($pprStyle->getAttribute('w:line'), 'twips') . ';';
}
}
That prevents adding the line-height if w:lineRule is set.
You can also use DOCXCustomizer and getWordStyles to read, parse and change/normalize existing styles if needed.
Regards.