News for hackers. Stuff that matters.
Re:Getting my daily news from a dot matrix printer by gpvos on Friday October 04, 2024 @12:26PM (#41742988)
Well, that's easy to check out as long as you have a printer connected. It's going to depend on the printer. Doesn't work on my Brother laser printer on Linux, even if I send some valid Postscript to /dev/usb/lp0 . Piping it to lpr works of course, as long as you have a default printer selected.

Once you've established that you can print basic text, you can expect that the printer's escape codes will work.

Re:Getting my daily news from a dot matrix printer by userbinator on Saturday October 05, 2024 @02:33AM (#41748112)
Doesn't work on my Brother laser printer on Linux, even if I send some valid Postscript to /dev/usb/lp0

It's probably expecting ESC/P or PCL. Laser printers also usually wait for a formfeed before they will process a page.

Re:Getting my daily news from a dot matrix printer by gpvos on Monday October 07, 2024 @11:00AM (#41766687)
Thanks. Adding a formfeed resulted in an empty page, so there are clearly possibilities but since I can't find a quick PCL example[0] and lpr suits me fine I'm not going to investigate further.

[0] I'm assuming PCL is most likely supported, and I remember having worked with an EPSON dot-matrix printer (i.e. probably using ESC/P) in 8-bit days and that it didn't require special commands to print basic text.