Hello,
After doing a lot of tests, we have checked that some Tidy installations don't respect the wrap option correctly.
Tidy configuration details that setting wrap as 0 disables any line wrapping (http://tidy.sourceforge.net/docs/quickref.html#wrap), but some versions/setups don't respect it. To solve this issue, that happens only in a few weird cases, the easiest solutions are: removing the wrap option or setting the wrap value to a big number.
The Tidy configuration can be found in the DOMPDF_lib.php file in the _load_html method. This is the default setting:
$tidy = tidy_parse_string($str, array('output-xhtml' => true, 'markup' => false, 'wrap' => 0, 'wrap-asp' => false, 'wrap-jste' => false, 'wrap-php' => false, 'wrap-sections' => false), 'utf8');
where wrap can be removed:
$tidy = tidy_parse_string($str, array('output-xhtml' => true, 'markup' => false, 'wrap-asp' => false, 'wrap-jste' => false, 'wrap-php' => false, 'wrap-sections
or set with a high value:
$tidy = tidy_parse_string($str, array('output-xhtml' => true, 'markup' => false, 'wrap' => 1000000, 'wrap-asp' => false, 'wrap-jste' => false, 'wrap-php' => false, 'wrap-sections
Using one of these solutions the extra space issue is solved.
phpdocx 9 added new options to set Tidy wrap settings.
Regards.