title: how to remove spacing inbetween addtext function using phpword
body: <p>I have the following code but i cannot figure out how to remove the line space or set custom line height etc.</p>
  
  <pre><code>require_once '/opt/html/paradox/protected/extensions/PHPWord/src/PhpWord/Autoloader.php';
          \PhpOffice\PhpWord\Autoloader::register();
          $phpWord = new \PhpOffice\PhpWord\PhpWord();
  
  
          $filename = "Weekly-Report - " . date('d F Y') ;
  
  
          // adding the necessary font styles
          $phpWord-&gt;addFontStyle('font_default', array('name'=&gt;'HelveticaNeueLT Std Lt', 'size'=&gt;11, 'color'=&gt;'000000'));
  
          $phpWord-&gt;addFontStyle('font_h2', array('name'=&gt;'HelveticaNeueLT Std Med', 'size'=&gt;14, 'color'=&gt;'6D6D6D'));
          $phpWord-&gt;addFontStyle('font_h3', array('name'=&gt;'HelveticaNeueLT Std Med', 'size'=&gt;12, 'color'=&gt;'949494'));
  
          //adding the necessary header/title styles
          $phpWord-&gt;addTitleStyle(1, array('name'=&gt;'Cambria (Headings)', 'size'=&gt;16, 'align'=&gt;'center','underline'=&gt;'UNDERLINE_SINGLE')); //h1
          //$phpWord-&gt;addTitleStyle(2, "font_h2"); //h2
          //$phpWord-&gt;addTitleStyle(3, "font_h3"); //h3
  
          //adding the necessary paragraph styles
          $phpWord-&gt;addParagraphStyle('paragraph_default', array('spaceBefore' =&gt; 0, 'spaceAfter' =&gt; 0));
          $paragraphOptions = array( 
                  'spaceBefore' =&gt; 0, 'spaceAfter' =&gt; 0
          );
  
          $fontStyleSubHeading = new \PhpOffice\PhpWord\Style\Font();
          $fontStyleSubHeading-&gt;setBold(true);
          $fontStyleSubHeading-&gt;setName('Calibri');
          $fontStyleSubHeading-&gt;setSize(11);
  
          //############################### STARTING DOCUMENT AND DEFINING STYLES ###############################
  
          /* Note: any element you append to a document must reside inside of a Section. */
          $section = $phpWord-&gt;addSection();
  
  
          $section-&gt;addTitle(
                  htmlspecialchars('Weekly Multi-Client Project Status Report '. date('d/M/Y'))
          );
  
  
  
          //$myTextElement-&gt;setFontStyle($fontStyleHeading);
  
  
          $criteria = new CDbCriteria;
          $criteria-&gt;select = "PROJECT, PERCENT, ExpectedCompletionDate, PROJINFO";
          $criteria-&gt;compare('NES',1);
          $criteria-&gt;addCondition('PERCENT &lt; 100');
          $criteria-&gt;compare('PROJCODE','W');
          $criteria-&gt;compare('deleted','0');
          $projects = Projects::model()-&gt;findAll($criteria);
  
          foreach ($projects as $project) {
  
              $myTextElement = $section-&gt;addText(
                      htmlspecialchars($project-&gt;PROJECT . ":")
  
              );
              $myTextElement-&gt;setFontStyle($fontStyleSubHeading);
  
              // Adding Text element to the Section having font styled by default...
              $percent = round($project-&gt;PERCENT,2);
              $section-&gt;addText(
                      htmlspecialchars('Total % Complete - '.$percent),
                      $paragraphOptions
              );
  
              $section-&gt;addText(
                      htmlspecialchars($project-&gt;PROJINFO)
              );
  
              $myTextElement = $section-&gt;addText(
                      htmlspecialchars('Action items for SI')
              );
              $myTextElement-&gt;setFontStyle($fontStyleSubHeading);
              $section-&gt;addText(
                      htmlspecialchars('None')
              );          
  
  
              $myTextElement = $section-&gt;addText(
                      htmlspecialchars('Action items for MC')
              );
              $myTextElement-&gt;setFontStyle($fontStyleSubHeading);
              $section-&gt;addText(
                      htmlspecialchars('None')
              );
  
          }
  </code></pre>
  
  <p>It should be a title and each for each section should be spaced apart and all the lines within shoudl have no spaces.</p>