This project is read-only.

how to add space before the text when i use function of addtext

Jul 2, 2010 at 7:26 AM
Now , I hava a problem ,I don't know how to add spaces before text , when I use $section->addText($text) , these spaces must be need , who could help me ,???Thank you very much!!
Jul 15, 2010 at 5:03 PM

This feature will be implemented in the next release. I you need it right now, go into the file Writer/Word2007/Base.php and insert the following line:

$objWriter->writeAttribute('xml:space', 'preserve');
Insert this new line right BEFORE the line 66 where the code "$objWriter->writeRaw($text);" is placed.

Jul 24, 2010 at 3:03 PM

Fixed in PHPWord 0.6.2 Beta. See current release.