Replies: 1 comment 1 reply
-
Hey @leonsitu, so first things first, using ESC POS protocol is all about sending bytes to an address, it can be parallel port, serial port, USB, or even an address in the network. That said, in windows if you don't have access to the printer's config admin through its own software, you can either arp your network and figure out your printer IP address and port (usually those use port 9100) or, as you did, you can install it and then share the printer so it will have a shared name in the network. For example, In the repo's Readme you can find examples of how to print using both ways. using static ESCPOS.Commands;
using ESCPOS;
using ESCPOS.Utils;
byte[] escPosCommand = PrintBarCode(BarCodeType.EAN13, "9780201379624");
escPosCommand.Print("192.168.0.100:9100"); //this will send the bytes to a printer with 192.168.0.100 IP address at port 9100 or if you want to use the printer's shared address and name using static ESCPOS.Commands;
using ESCPOS;
using ESCPOS.Utils;
byte[] escPosCommand = "Some string".ToBytes();
escPosCommand.Print("\\127.0.0.1\my_printer"); |
Beta Was this translation helpful? Give feedback.
-
Hi there,
How do I actually get the printer address on a windows 10?
I have a StarMicronic TSP hook up on the network. The drivers are installed correctly, I can go to notepad.exe and print what ever I want to this printer.
Is there a some dot net code sample that would listed out the available printer address available to used by your extentions method?
I can for sure use this following "windows" only code to print to my printers.
Thanks
-Leon
Beta Was this translation helpful? Give feedback.
All reactions