Open macoslinux opened 3 years ago
please add this new funcion to Printer.php this is for Star SP500 - SP512 -SP700 printer.
In file : Line: 887 -> Mike42\Escpos\Printer.php
/** * Select justification Star SP500 Printer. * * @param int $justification One of Printer::JUSTIFY_LEFT, Printer::JUSTIFY_CENTER, or Printer::JUSTIFY_RIGHT. */ public function setJustificationStar($justification = Printer::JUSTIFY_LEFT) { self::validateInteger($justification, 0, 2, __FUNCTION__); $this -> connector -> write(chr(27) . chr(29) . "a" . chr($justification)); }
the example will be like this: $connector = new XXXXX $printer = new Printer($connector); $printer->setJustificationStar(Printer::JUSTIFY_CENTER);
please add this new funcion to Printer.php this is for Star SP500 - SP512 -SP700 printer.
In file : Line: 887 -> Mike42\Escpos\Printer.php