Created
September 4, 2014 09:40
-
-
Save roniemicro/8a1aa65f7750a0fe5997 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include "vendor/autoload.php"; | |
| $ID = 12345; | |
| $str = <<<EOD | |
| This is the body | |
| Name : Roni | |
| ID : {$ID} | |
| --------------------- | |
| EOD; | |
| $device = new \Epson\Devices\Network('192.168.1.250'); | |
| $printer = new \Epson\Printer($device); | |
| $printer->setJustification(\Epson\EscPos::JUSTIFY_CENTER); | |
| $printer->setEmphasis(); | |
| $printer->setUnderline(1); | |
| $printer->setDoubleSize(true); | |
| $printer->text("Header"); | |
| $printer->setDoubleSize(false); | |
| $printer->setUnderline(0); | |
| $printer->setJustification(\Epson\EscPos::JUSTIFY_LEFT); | |
| $printer->setEmphasis(false); | |
| $printer->text($str); | |
| $printer->setBarcodeTextPosition(\Epson\EscPos::BARCODE_TXT_ABOVE); | |
| $printer->barcode($ID); | |
| //$printer->image('right.png'); | |
| $printer->cut(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment