On 26 Nov 09:53, Peter Alcibiades wrote:
OK, still struggling with this stuff, and yes, I have googled it to death with mixed success. How does raw printing work exactly? Do you get to send an ascii character stream directly to the printer, and how does the printer know what to do with it? Are there any decent references anywhere?
All I am looking to do is send a few characters and line feeds, and don't care about fonts or formatting of any sophisticated sort. One would think it should be possible using lpr, but if anyone has actually done this, it might save a lot of time and experimentation.
This is just printing characters, its not real document printing, layout, all that stuff.
RAW printing is *exactly* that. It's a RAW print, basically every byte that is in the thing that you're sending is sent *directly* untouched to the printer. It's most useful when you have a .prn file from a windows machine that is output in the format expected by the printer and you want to print it. It's not useful for basically anything else.
Now, if you just want text output, I'd rather suggest that you forget lpr (which you should anyways - in theory that's just going to be a wrapper for lp assuming that you're using CUPS), and use a2ps.
For very basic output something like: a2ps -B -1 filename.txt
or if you've got a command outputting the data: my_command_here | a2ps -B -1
The -B says "no header", and the -1 means "1 page is 1 page" (the default is -2, which does 2 up printing, and has headers).
Hope that helps,