`require DIR . '/vendor/autoload.php';
use Mike42EscposPrinter;
use Mike42EscposEscposImage;
use Mike42EscposPrintConnectorsWindowsPrintConnector;
require 'config.php';
date_default_timezone_get('Africa/Kampala');
if (isset($_SESSION['t_admin'])) {
}else{
session_start();
$info=array();
$info=$_SESSION['t_admin'];
}
INFORMATION TO THE USER TROUBLE SHOOTING GUIDE!! ADJUSTMENT OR ALTERATIONS OF THIS DEVICE MAY RESULT IN HAZARDOUS RADIATION EXPOSURE. TOOLS NEEDED: - Measuring Tape / Ruler - Hole Saw MGR350B (1pc) Hexagon Mounting Studs (2pcs) M4 Secure Nuts (8pcs) User Manual (1pc) Metal Bracket (1pc) B A N D SR C F UNC M E N U ENT R DI SP VO L VO.
/**
Install the printer using USB printing support, and the 'Generic / Text Only' driver,
then share it (you can use a firewall so that it can only be seen locally).
Use a WindowsPrintConnector with the share name to print.
Troubleshooting: Fire up a command prompt, and ensure that (if your printer is shared as
'Receipt Printer), the following commands work:
echo 'Hello World' > testfile
copy testfile 'DESKTOP-V8JT52GReceipt Printer'
del testfile
/
try {
// Enter the share name for your USB printer here
$connector = null;
$connector = new WindowsPrintConnector('smb://Tech Guruz:1994@DESKTOP-R21HIJR/labmaster_p');
/ Print a 'Hello world' receipt' /
$printer = new Printer($connector);
$printer -> initialize();
/ Information for the receipt */
class item
{
private $name;
private $price;
private $dollarSign;public function __construct($name = ', $price = ', $dollarSign = false)
{
$this -> name = $name;
$this -> price = $price;
$this -> dollarSign = $dollarSign;
}public function __toString()
{
$rightCols = 10;
$leftCols = 38;
if ($this -> dollarSign) {
$leftCols = $leftCols / 2 - $rightCols / 2;
}
$left = str_pad($this -> name, $leftCols) ;}
}
function title(Printer $printer, $text)
{
$printer -> selectPrintMode(Printer::MODE_EMPHASIZED);
$printer -> text('n' . $text);
$printer -> selectPrintMode(); // Reset
}
`
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Jun 1, 2016
Dear mike, I see there is some chinese printer that work with escpos-php like: I have XPrinter xp-360B, i wish i can use it on my web application on linux. I have succeeded to test echo 'test' >> /dev/usb/lp0 on my epson tmu-220 Could you help me to make this printer work? Regards, |
added the printer-compatibility label Jun 1, 2016
commented Jun 1, 2016
Are you sure this is an ESC/POS printer? (eg, this person is asking about TSPL)
|
commented Jun 1, 2016
Dear mike, Thank you for helping. I close this issue Regards, |
commented Jan 15, 2018
i just got the Xprinter-xp 350 BM, and this library doesn't support the printer. |
commented Jan 16, 2018
Thank you for your response.I have solve my problem. I use ZPL language to printSent from Yahoo Mail on Android On Tue, 16 Jan 2018 at 0:40, krixnaas<[email protected]> wrote:i just got the Xprinter-xp 350 BM, and this library doesn't support the printer.—You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub, or mute the thread. |