Break up text to 32 characters length. #50

Merged
krzysiej merged 1 commits from issue-49 into master 2018-07-29 17:13:20 +02:00
Showing only changes of commit 7a5e7a5d9d - Show all commits

View File

@@ -98,6 +98,18 @@ class HtmlToPos
return $data;
}
/**
* łamie tekst w miejscu spacji do długości 32 znaki na linię
* @param $posText
* @return string
*/
public function textBreak($posText)
{
$posText = wordwrap($posText, 32);
return $posText;
}
public function convert($html = '')
{
$posText = $this->handleNewLine($html);
@@ -107,8 +119,8 @@ class HtmlToPos
$posText = $this->vocabularyWord($posText);
$posText = $this->traficar($posText);
// print_r($posText);
// die();
$posText = $this->textBreak($posText);
return $posText;
}
}