i have a documents where i replace a variable:
$docx = new CreateDocxFromTemplate($tmp_file_path);
$docx->replaceVariableByText($params);
it works fine at this step.
next step i convert docx to pdf.
$docx = new TransformDocAdvLibreOffice();
$docx->transformDocument($file['path'], $file_path ,'',['method'=>'direct','debug' => true]);
and thats when the issues happens new lines are instered before and after the variables. i tested the same document without replacing variables and do not experience same issue.
i.e.
Date retained: 2019-05-07 Date retained: 2019-05-07
Date retained: 2019-05-07
turns into:
Date retained:
2019-05-07
Date retained:
2019-05-07
Date retained:
2019-05-07