Forum


Replies: 5   Views: 1533
Extra space printed before the replaced variable with "replacevariablebyhtml"
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 01-10-2020 - 14:59

Hello,

It's no a phpdocx problem but from some PHP Tidy versions that wrap contents (that ommits the wrap option sets as 0 to avoid wrapping), if we run your code on our test servers we get the correct output without the extra blank spaces. You can change Tidy settings in the INI settings file (https://www.php.net/manual/en/book.tidy.php), or use the removeLineBreaks option with HTML methods or edit DOMPDF_lib.php file and replace the following line:

'wrap' => 0,

by a very high value, for example:

'wrap' => 99999999999999,

The next release of phpdocx will include the previous change to avoid that issue from PHP Tidy.

Regards.