I wanna connect thermal printer with php base website. I have make a restaurant website with php and now I want that when client pay the bill via card it print the reciept auto on thermal printer. will someone help me to do this ??
Asked
Active
Viewed 3,836 times
-6
-
Please use only tags that are relevant to your problem, and explain _how_ they are relevant. That being said, your question is way too broad, StackOverflow is strict Q&A, not a place to ask for assistance. If you need such help, you better hire someone. – ndm Jun 01 '16 at 12:53
2 Answers
0
You are asking wrong question, so, please modify it. Actually it's not connected to PHP at all. U need to know how access this printer programmatically, check it's documentation if they have an API for this.
Also, please check this question.

Community
- 1
- 1

Andrey Degtyaruk
- 488
- 4
- 9
0
Check the list of printers from this list and if your printer is one of them. You can simply download script from the link below: https://github.com/mike42/escpos-php
Add this code to your PHP page. But remember printer should be attached with server not your system. Or you can test it through xamp or appserv if you want to test it on your system.
require __DIR__ . '/vendor/autoload.php';
use Mike42\Escpos\PrintConnectors\FilePrintConnector;
use Mike42\Escpos\Printer;
$connector = new FilePrintConnector("php://stdout");
$printer = new Printer($connector);
$printer -> text("Hello World!\n");
$printer -> cut();
$printer -> close();

GamesPlay
- 105
- 1
- 8
-
No `vender/autoload.php` (which you called on first line of ur code) available in your given link. – Rishabh Apr 25 '22 at 08:18