This repository has been archived on 2019-03-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
paper-pi/app/Paper/HtmlToPos.php
2017-07-18 08:57:31 +02:00

28 lines
348 B
PHP

<?php
namespace App\Paper;
class HtmlToPos
{
private function handleNewLine($text)
{
return str_replace(['<br>', '<br/>', '<br />'], "\n", $text);
}
public function convert($html)
{
$posText = $this->handleNewLine($html);
// print_r($posText);
// die();
return $posText;
}
}