From This link(Printing to POS printer from PHP) i started I have use php sample code. my question is my printer is set to default then why i have to connect to printer. anyway i am getting error on connecting printer. as my printer name is in fig1 and to access printer i have to type \Sah-it\ARP-808K in run as shown in fig2. i have tried:
1.
$connector = new FilePrintConnector("\\Sah-it\ARP-808K");
$printer = new Printer($connector);
2.
$profile = CapabilityProfile::load("simple");
$connector = new WindowsPrintConnector("smb://Sah-it/ARP-808Kr");
$printer = new Printer($connector, $profile);
3.
$connector = new NetworkPrintConnector("\\Sah-it\ARP-808K");
$printer = new Printer($connector);
all gives me connection error. Kindly help me to connect printer. Thanks
Fig1:
Fig2:
I've personally not used ESC/POS Print Driver for PHP library but the documentation does state the use in a fairly detailed way. Judging by your images, you have a printer shared from a server called
\\Sah-it\ARP-808K
. To connect (guessing the printer is an Epson), it's advised you do the following:Note: Suitable for Epson TM-series printers so check documentation to ensure your printer is supported
If your having issues with the above via hostname, then check your PHP servers DNS configuration as it may not be able to resolve
Sah-it
. In this instance I would suggest trying to connect via IP to the printer (if networked) or to your print-server's IP using the following:if you have further issues then add your printer make and model, confirm your Webserver can resolve
\\Sah-it
and add any relevant errors which may help.