escpos-php
escpos-php copied to clipboard
TSC PE200 compability inquiry
Hello sir, First of all, I would like to thank you for contributing this amazing package for the community.
I've been using this package for a while but have not yet successfully integrate as I am perplex as to why my thermal printer does not print anything even though no error was displayed. I have tried many options and researched a lot on this. I have tested on Windows and Linux, tried different connectors but to no avail. I'm not sure what is wrong.
Here is latest implementation for your reference: try { // $connector = new FilePrintConnector("SWD\PRINTENUM{83B0BF67-C08F-44BB-91C1-41655E5EB894}"); // $connector = new FilePrintConnector("php://stdout"); // $profile = CapabilityProfile::load("simple"); // $connector = new WindowsPrintConnector("printer_mm"); // $connector = new NetworkPrintConnector("10.148.0.1", 9100); $connector = new FilePrintConnector("/dev/ttyS0");
$printer = new Printer($connector);
$printer->text("Hello World!\n");
$printer->feed(4);
$printer->cut();
$printer->close();
// return response()->json(['status' => 'OK']);
} catch (Exception $e) {
echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
}
I have also set my printer as default, and opened Share network. I connect the printer with my laptop via USB port.
Could I confirm whether model TSC PE 200 is compatible with this package?
Thank you in advance.