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.
Hello,
when i use addTemplateVariable, is it possible to erase spacing after a variable in case it is empty?
e.g. $ADDRESS$ $TITLE$ $NAME$
When $TITLE$ is empty, i have two spaces between address and name, there should be only one.
Andreas
Hello,
You could add a placeholder like $SPACE$ and replace or remove it. Or use only a placeholder in your template and replace it with a string generated by your code.
Regards.
Hello,
thank you for your answer.
I tried to add a spacing after the value for a variable before replacing it, but in the output the spacing is erased.
How can force the output of a spacing at the end of a value?
Andreas