Hello. I have a problem with replacing text in a document. The space after the replaced phrase disappears.
<?php
require_once '/classes/DocxUtilities.inc';
$docx = new DocxUtilities();
$options = array(
'document' => true,
'endnotes' => true,
'comments' => true,
'headersAndFooters' => true,
'footnotes' => true,
);
$search = '$Larue HAFFAR$';
$replace = '$Grace WEKLEY$';
$docx->searchAndReplace('error.docx', 'out.docx', $search, $replace, $options);
Document: https://dl.dropboxusercontent.com/u/47221682/phpdocx/error.docx
Images:
Original: https://dl.dropboxusercontent.com/u/47221682/phpdocx/original.png
Replaced: https://dl.dropboxusercontent.com/u/47221682/phpdocx/replaced.png