<?php
require __DIR__ . '/phppos/autoload.php';
use Mike42\Escpos\Printer;
use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;

try {
	// Enter the share name for your USB printer here
	$connector = new WindowsPrintConnector("POS");
	$printer = new Printer($connector);

	/* Print a "Hello world" receipt" */
	$printer -> text("*******SOLVED*************!\n");
	$printer -> text("Special Thanks To!\n");
	$printer -> text("Michael For Helping!\n");
	$printer -> text("Me in Getting POS Printer!\n");
	$printer -> text("Working !\n");
	$printer -> text("Thank You !\n");
	$printer -> cut();
	
	/* Close printer */
	$printer -> close();
} catch(Exception $e) {
	echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
}