Detecting printer fault indicators with filters
Just as converting a file and handling special printing modes
is printer-specific, so is printer fault detection.
The print service attempts to do this in general,
and for most printers, it properly detects faults.
However, it is limited to checking for ``hangups''
and excessive delays in printing.
The print service cannot determine the cause of the fault,
so it cannot tell you exactly what to look for.
A properly designed filter can provide better fault coverage. Some printers can send a message to the host describing the reason for a fault. Others indicate a fault by dropping the carrier or shutting off data flow. A filter can serve you by giving more information about a fault and detecting more of them.
Filters can wait for a printer fault to clear and then resume printing. This allows for more efficient printing when a fault occurs because the print job that was interrupted does not have to be reprinted in its entirety. Only a filter that understands the control sequences used by a printer knows where a file breaks into pages. Thus, only the filter knows how far back to go in the file to restart properly.
The print service has a simple interface that lets the filter get the fault information to you and restart the print job if it can. The alerting mechanism is handled by the print service. The interface program that manages the filter takes all error messages from the filter and places them into an alert message that can be sent to you. Thus, you see any fault descriptions that the filter puts out. If you set the printer configuration so that printing should automatically resume after a fault is cleared, the interface program keeps the filter active so that it can pick right up where it left off.