igorocampos / ESCPOS

A ESC/POS Printer Commands Helper
56 stars 22 forks source link

To print on USB #34

Closed ctenov closed 1 year ago

ctenov commented 1 year ago

Hi, anyone already printed via USB (RAW) using this ESCPOS library ? On main page of ESCPOS there are examples like:

"... It can be something like COM3, LPT1, \127.0.0.1\printer, 192.168.0.100:9100, etc. or even a path to a text file like ./print.txt."

but are no mention on RAW USB...

All this devices (except LPT1) I tested and is OK, AND when a USB is mapped to Serial Port too, but there is some printers that map only USB device without emulation of serial... (USB001, USB002, etc)

I can´t print on this ports (USB). Anyone could help me ? Maybe a specific string that I have not used... (??? \USB001 ???)

Thanks

igorocampos commented 1 year ago

This library is not prepared to print directly via USB port. However, you can easily share the connected USB printer in the LAN and print it via IP address + shared printer name, e.g. \\192.168.0.100\shared_printer

ctenov commented 1 year ago

Ok, many thanks