Bye CUPS: Printing with Netcat
21–30 of 183 posts
Re: Bye CUPS: Printing with Netcat
#22Magic in printing is still an arcanum. PPD files. Windows 10 as a print server. (some print devices are not networked)
Prelude files. in-printing logic like line reversal, density adjustments for photos. Double sided printing meta-signalling, n-up..
"oh, I don't need that stuff" fine, fine, nc is going to work for you, at the end of a bumpy road to a printer which supports it. And, right up until its 2am, you want to colour print that late birthday card for your favourite aunt, and the printer is stuck on nc...
Re: Bye CUPS: Printing with Netcat
#23If you have a single host, and a single printer, or your printer itself is both network-enabled and can manage its own print spool, direct TCP/IP printing may indeed work for you. The value of CUPS is that it enables the CUPS-serving computer to run as a print server . This means not only print drivers (document format support --- typically plain text, Postscript, and one or more PDL (printer definition languages) &…
If you still need a print server, it can be well worth the extra $100 or so to buy a business-class printer with an IPP server in it, so that CUPS runs on a chip inside the printer instead of on a separate computer. (Generally anything that supports "Airprint" will do this, and also at the mid range you avoid the "printers whose ink cartridges are more expensive than the printer" zone.)
Re: Bye CUPS: Printing with Netcat
#24I'd try to find these printers used then I'd upgrade them: more RAM, more fonts, adding a network card inside the printer etc.
I still have several of these printers in a garage, some of them have printed more than 300 000 pages. They probably still work: some things were that good back then.
And, yup, there's something feeling magical when netcat'ing a .ps file (or another format) directly to the printer.
Re: Bye CUPS: Printing with Netcat
#25Re: Bye CUPS: Printing with Netcat
#26This is how this Hackernews printed several pages worth of the plaintext representation of a PDF on an office printer a few years ago before figuring out how to cancel the job.
So how did you cancel it? I assume killing the nc process wasn't enough because it had buffered the whole file, so you had to do it at the printer?
Re: Bye CUPS: Printing with Netcat
#27Hah. I had a similar moment of enlightenment with FreeBSD when somebody explained that you can just cat a wav file into /dev/audio (or /dev/dsp? forget the exact name). And that you can produce white noise by catting /dev/random to the same destination. With no barrier to the sound card like that, I was free to experiment with programming dfferent noise algorithms and figuring out how digital audio works. I eventuall…
Consider lowly embedded linux. You COULD dig down deep into the documentation of which register, which interrupt, which special memory address needs to be written to interact with the right ports on a embedded linux board. All while adding a bunch of safeguards and checks to make sure "Only you are doing this".
Or, as if often the case, you can simply find the right /dev/xxxx device and read from it or write to it.
9 times out of 10, you'd not suffer any negative consequences from using the /dev/xxx system as intended and you get the bonus ability of being able to interact with the outside world using programming languages other than C.
Re: Bye CUPS: Printing with Netcat
#28Have fun printing a shipping label from your phone using Netcat.
Re: Bye CUPS: Printing with Netcat
#29I used to do this at home all the time (from Linux though): networked printer with its own IP address and then good old netcat. I'd do it with PostScript files and send them to HP LaserJet 4M+: not only do these beauties speak PostScript natively, they can also be made to display the infamous "PC LOAD LETTER" message. I'd try to find these printers used then I'd upgrade them: more RAM, more fonts, adding a network ca…
Re: Bye CUPS: Printing with Netcat
#30How would you get an application, such as Firefox or Chrome, to know to use netcat to print?
Choose Jetdirect/Appsocket in the printer add menu and it will do the same thing. There is nothing magic about netcat. You are just dumping Postscript/PDF data on a TCP port the printer is listening on.