[net.unix] Printers & Binary data

A.ANDY@SU-GSB-WHY.ARPA (Andrew Gideon) (05/23/85)

Help.

I have a flter to print .DVI files on our laser printers.  It works
perfectly when the printer is on the network, but if the printer
being used is directly connected to the VAX (4.2 bsd), it workth
not.

My guess is that the printer driver's manipulations are doing
damage to the data being sent to the printer.  I thought to
elliminate this by including the line ":fs#00340:" in the printcap,
which (according to the spooler documentation) should cause the
printer to be opened in RAW mode.  It has zero effect.

Does anyone know what I am doing wrong?  Please?


				Andrew Gideon
				Gideon@SU-Score.arpa

P.S.	Network printers do NOT use the kernal's printer driver
	in our setup.

-------

lwall@sdcrdcf.UUCP (Larry Wall) (05/28/85)

In article <10931@brl-tgr.ARPA> A.ANDY@SU-GSB-WHY.ARPA (Andrew Gideon) writes:
>
>Help.
>
>I have a flter to print .DVI files on our laser printers.  It works
>perfectly when the printer is on the network, but if the printer
>being used is directly connected to the VAX (4.2 bsd), it workth
>not.
>
>My guess is that the printer driver's manipulations are doing
>damage to the data being sent to the printer.  I thought to
>elliminate this by including the line ":fs#00340:" in the printcap,
>which (according to the spooler documentation) should cause the
>printer to be opened in RAW mode.  It has zero effect.
>
>Does anyone know what I am doing wrong?  Please?

I don't know if this relates, but I will relate it anyway.

I was trying to get an HP laserjet (cute little beastie) to work with the
4.2 terminal driver and the printcap file.  There's a bit of a catch 22,
however.

1) The printer absolutely does not want to receive parity bits.

So we set the interface to raw, and very short files work.  Long files
get munched, because,

2) The printer uses ^S/^Q to do flow control, which gets disabled by
raw mode.

So, turn off raw mode, turn on LITOUT mode using the "fc" capability.

Guess what, it still doesn't work.

After scratching your head for a very long time, running stty on the port
while it's printing, etc, you determine that it's ignoring the "fc"
capability because the line is not set into the "new" tty line discipline
yet.  Oops.

We fixed it by writing an output filter that sets stdout to the correct
line discipline, does the "fc" itself, and then, more or less, passes the
file through unchanged (it does translate tabs, which the Laserjet doesn't
seem to grok).

The reason your network connection works could either be because it doesn't
transmit parity, or because it does its own flow control.

If this helps, send money.  If it doesn't, feel free to send money anyway.

Larry Wall
{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall