You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given you have word document, with placeholders like ${some.object.path} any change in any place of the document can add some xml inside the brackets of the placeholder.
$template = new \PhpOffice\PhpWord\TemplateProcessor($this->templatePath);
throw new \Exception(print_r($template->getVariables(), TRUE));
3 and 5 will never be replaced as they are screwed up by word 😢 as i use getVariables to obtain real object pathes from my domain model i used strip_tags to transform it into a useable object path again.
But neither giving the broken values 3 / 5 to set values gives a successfull replacement ... any idea? my current approach is to digg deeper into the setValueForPart function and understand what you do with value cleaning ...
The text was updated successfully, but these errors were encountered:
mean i do 2 replacements per document, one with the xml tags included and one with the xml removed with strip tags ... this makes it a little more robust for me, IMHO this should be fixed with some kind of mapping table, as the correct areas are detected.
Given you have word document, with placeholders like
${some.object.path}
any change in any place of the document can add some xml inside the brackets of the placeholder.gives f.e. the following array
3
and5
will never be replaced as they are screwed up by word 😢 as i use getVariables to obtain real object pathes from my domain model i used strip_tags to transform it into a useable object path again.But neither giving the broken values
3
/5
to set values gives a successfull replacement ... any idea? my current approach is to digg deeper into thesetValueForPart
function and understand what you do with value cleaning ...The text was updated successfully, but these errors were encountered: