Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsuppersahabatan/esc-pos
Make your web application support direct printing!
https://github.com/rsuppersahabatan/esc-pos
cetak codeigniter epson esc-pos pendaftaran php php5 printer tracer
Last synced: 3 months ago
JSON representation
Make your web application support direct printing!
- Host: GitHub
- URL: https://github.com/rsuppersahabatan/esc-pos
- Owner: rsuppersahabatan
- Created: 2017-05-08T04:14:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T02:33:04.000Z (6 months ago)
- Last Synced: 2024-10-12T12:04:22.026Z (3 months ago)
- Topics: cetak, codeigniter, epson, esc-pos, pendaftaran, php, php5, printer, tracer
- Language: PHP
- Homepage: https://topidesta.my.id/library-esc-post-dicodeigniter-server-side-printing
- Size: 616 KB
- Stars: 16
- Watchers: 4
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ESC-POS-CODEIGNITER
ORIGINAL FROM:
https://github.com/mike42/escpos-php/tree/masterSTEP:
1. Download all files in this github or the source
2. Put the folder of all Mike42 to third_party
3. Create File in libraries folder, with EscPos.php
4. And run!Example:
~~~PHP
try {
// Enter the device file for your USB printer here
// You can check the tutorial here: https://mike42.me/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux
$connector = new FilePrintConnector("/dev/usb/lp0");
/* Print a "Hello world" receipt" */
$printer = new Printer($connector);
$printer -> text("Hello World!\n");
$printer -> cut();
/* Close printer */
$printer -> close();
} catch (Exception $e) {
echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
}
~~~More: https://mike42.me/blog/2015-03-getting-a-usb-receipt-printer-working-on-linux
Notes:
1. Login as Root
2. Write: chown -R user:user /dev/usb
3. As alternatif if, sudo usermod -a -G lp user NOT WORKING!This Is in Codeigniter!
~~~PHP
$this->load->library("EscPos.php");try {
// Enter the device file for your USB printer here
$connector = new Escpos\PrintConnectors\FilePrintConnector("/dev/usb/lp0");
/* Print a "Hello world" receipt" */
$printer = new Escpos\Printer($connector);
$printer -> text("Hello World!\n");
$printer -> cut();/* Close printer */
$printer -> close();
} catch (Exception $e) {
echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";
}
~~~## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=rsuppersahabatan/ESC-POS&type=Date)](https://star-history.com/#rsuppersahabatan/ESC-POS&Date)
## [![Repography logo](https://images.repography.com/logo.svg)](https://repography.com) / Top contributors
[![Top contributors](https://images.repography.com/53549288/rsuppersahabatan/ESC-POS/top-contributors/H4IOSPEOE5t_kJczUIUk9OyEIaKlh538YAXm8ybCFFQ/z-9ludcu-oFzMgVTq8gsyX81B877T7rb1Ou1hJ1B4wY_table.svg)](https://github.com/rsuppersahabatan/ESC-POS/graphs/contributors)Done!
More info: topidesta.wordpress.com