Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Dot-matrix still has its applications' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Dot-matrix still has its applications
Authored by: blinkintosser on May 25, '10 06:31:43PM

Aside from multi-part forms, dot matrix printers are still very useful for live line-by-line logging — each line of text is immediately printed as it is received by the printer without having to eject an entire page. With a sheet-fed printer, like a common laser or inkjet, you will not see any output until you have either filled a page or cause the page to be printed only partially full. (On one of the Windows systems I maintain at work, we have three 80-column dot matrix printers keeping paper logs of all “signals” as they arrive for immediate review should anyone doubt the integrity of the automation system that interprets them.)

I do suspect, however, that this hint permits only sheet-fed behavior from a dot-matrix even when using continuous, tractor-fed paper. For line-by-line printing from OS X, you may have to use a printer with a serial or network interface as there does not appear to be a straightforward method for sending raw data out of a local parallel port from a shell script unless you are prepared to compile some C code for the task ( http://forums.macosxhints.com/showthread.php?t=111504 ).

For some development work I did recently with a label printer, I found it easier to connect the printer to the parallel port of a Windows box running the following batch file:

:: LPTserv.cmd
:: Ad-hoc parallel-port print server (raw/JetDirect-like)
:: Requires Netcat for win32 in %path%
:Wait4Job
NC.EXE -lp 9100 > LPT1:
GOTO :Wait4Job

One can then send data to it in any manner that one can interact with a TCP socket — e.g. echo anything >/dev/tcp/winpc-address/9100 — or even announce it over Bonjour/DNS service discovery to have it available in the OS X “Add Printer” dialog:

#!/bin/sh
dns-sd -P "Eltron 2442" _pdl-datastream._tcp. . 9100 winpc-address 0.0.0.0 \
  textvers=1 qtotal=1 ty="Zebra EPL2 Label Printer" product="(Eltron 2442)" \
  pdl=application/epl2 note="Ad-hoc Hosted on Windows" Transparent=T \
  Binary=T Color=F Copies=F Duplex=F PaperCustom=T Bind=F Collate=F Sort=F \
  Staple=F Punch=F &


[ Reply to This | # ]