src/wcmf/lib/pdf/PDF.php
public function numberOfLines($width, $text) {
    $nbLines = 0;
    $lines = preg_split('/\n/', $text);
    foreach ($lines as $line) {
      $nbLines += $this->NbLines($width, $line);
    }
    return $nbLines;
  }
public function numberOfLines($width, $text) {
    $nbLines = 0;
    $lines = preg_split('/\n/', $text);
    foreach ($lines as $line) {
      $nbLines += $this->NbLines($width, $line);
    }
    return $nbLines;
  }
public function numberOfLines ( $ width , $ text ) { $ nbLines = 0 ; $ lines = preg_split ( '/\n/' , $ text ) ; foreach ( $ lines as $ line ) { $ nbLines += $ this -> NbLines ( $ width , $ line ) ; } return $ nbLines ; }
Computes the number of lines a MultiCell of width w will take
instead of NbLines it correctly handles linebreaks
@param $width The width
@param $text The text
Computes the number of lines a MultiCell of width w will take instead of NbLines it correctly handles linebreaks