Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Printing to printer - Linux - LPRINT alternative?
#27
(06-06-2023, 06:13 AM)Ultraman Wrote: Wow. Makes me wish that Kevin's my solution hadn't been expunged from the Wiki. The one that works in Linux. The one that allows for printing to a printer. With opening a TCP/IP connection to the printer on port 9100 and sending raw data. The one that goes something like this:

Code: (Select All)
c = _OPENCLIENT("TCP/IP:9100:XXX.XXX.XXX") 'replace Xs with the IP address
DIM AS STRING formFeed: formFeed = CHR$(12)
IF c THEN
PUT c, , yourData$
PUT c, , formFeed
CLOSE c
END IF
'DISCLAIMER: I quickly rewrote this using the forum text editor. Edit for your own needs. You might have to also use CHR$(13) + CHR$(10). It depends on printer model. Good luck
@Ultraman

Awesome approach. Thank you.  Smile
Reply


Messages In This Thread
RE: Printing to printer - Linux - LPRINT alternative? - by desA - 06-07-2023, 03:11 AM



Users browsing this thread: 2 Guest(s)