mike42 / escpos-php

PHP library for printing to ESC/POS-compatible thermal and impact printers
Other
2.59k stars 863 forks source link

POS-58 printer on Windows, do I need to share it? #721

Open ghost opened 5 years ago

ghost commented 5 years ago

require DIR . '/autoload.php';

use Mike42\Escpos\Printer; use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;

$connector = new WindowsPrintConnector('POS-58-Series');
$printer = new Printer($connector);
$printer -> text("Hello World!\n");

$printer -> cut(); $printer -> close();

mike42 commented 5 years ago

Standard printer sharing is the most straightforward way to allow your PHP server (on localhost or the LAN) to see your printer. You can lock down a shared printer with a username/password/ACL and/or Windows firewall if needed.

If you are on localhost only, then the feature request at #474 would avoid printer sharing, provided that you have the necessary extension installed.

mike42 commented 5 years ago

I've shortened the title of this issue so that it fits on one line, I hope you don't mind :)

ghost commented 5 years ago

thanks , i dont mind at all.. what kind of necessary extension installed do you mean?

Vallevard commented 5 years ago

I use a pos-58 printer. In my case I just install the driver of the printer and then I shared. It was on localhost. Hope this helps.