Forum


Replies: 1   Views: 3826
Templates linespacing
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 rjonge  · 23-11-2011 - 10:51

Hello,

When I use a template, the space between lines in the generated docx file is much bigger than the space between the lines in the template. does anybody know a solution?

For example:

template.docx
---------------------------------------
name = $varname$
birthdate = $varbirthdate$

When I use this template and create a new docx file with variabeles, the space between those lines (name and birthday) are much bigger than in the template.


$docx = new CreateDocx();
$docx->addTemplate('./template.docx');
$docx->addTemplateVariable('varname', 'Roy');
$docx->addTemplateVariable('varbirthdate', '01-01-2011');
$docx->createDocx('newdoc');

[b]Result:[/b]
a file named newdoc.docx with:
name = Roy
birthdate = 01-01-2011

but much bigger space between the name and birthdate line comparing the used template.