diff --git a/app/Paper/HtmlToPos.php b/app/Paper/HtmlToPos.php index 6b91fef..ca6567d 100644 --- a/app/Paper/HtmlToPos.php +++ b/app/Paper/HtmlToPos.php @@ -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; } } \ No newline at end of file