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.
That should work fine then.
Set up the printer as a raw device in cups and then
lp -d printername sometextfile.txt
should work, although sending the cups test pages won't so don't do that unless you want to waste lots of paper.
In fact I was sure there was a way with something like -o raw of telling lp to print in raw mode even if it isn't set up as a raw printer, but suddenly I can't see a reference to that now.
The only other gotcha is that in some versions of cups you have to uncomment a mime type in /etc/cups/ for it to accept raw jobs.
I just did this on a SCO box (using cups because the bsd like printing in SCO is horrible) for an application that sends files to things like cheque printers and inserts all the control characters itself.
Oh and as Brett says...stop using lpr :)