Postscript printer on ttyS0

Postscript printer on ttyS0

Post by Alan J Teede » Sun, 26 Mar 1995 21:36:16



However many times I read the Print HowTo I still have problems
with  my old Apple LaserWriter II on the serial port of my NEC laptop.

A single file prints ok, but at the end of the job the printer "busy" lamp
is still flashing. After several minutes the printer gets bored and
the flashing stops. If another file is sent to the printer while it
is "busy" it prints out a rainforest worth of blank pages.

Also the last page of a large document is sometimes missed out.

Here is my printcap entry:-

lp|PostScript|serial printer:\
        :lp=/dev/ttyS0:\
        :sd=/var/spool/lpd:\
        :lf=/var/spool/lpd/errs:\
        :if:\
        :br#38400:\
        :mx#0:\
        :rw:\
        :sh:\
        :fc#0171500:\
        :fs#0006277:\
        :xc#0157777\
        :xs#0000000:

Sending files with "cat > /dev/ttyS0" has the same effect.

A similar entry (apart from the lp,fc,fs,xc and xs lines) works fine
when the printer is plugged into my Sun. The printer is also OK when
driven by MS Windows from the same PC.

 
 
 

Postscript printer on ttyS0

Post by Stephen Harr » Mon, 27 Mar 1995 02:36:44



: However many times I read the Print HowTo I still have problems
: with  my old Apple LaserWriter II on the serial port of my NEC laptop.

: A single file prints ok, but at the end of the job the printer "busy" lamp
: is still flashing. After several minutes the printer gets bored and

This is perfectly normal behaviour for a postscript printer if you do not
send a ^D at the end of the job  (control-d means end-of-job to a postscript
printer).  Without this it thinks the current job is still active and so the
BUSY light flashes.  Eventually you will get a "job timeout" error and the
printer will reset.

To fix:  You need to create a simple filter.
Something along the lines of:
  #!/bin/bash
  cat
  echo -n -e "\004"

Make this script executable ("chmod 555") and then place it somewhere
nice (eg /usr/lib/lpd.ps.filter)
Then make the printcap if= entry point to it (eg if=/usr/lib/lpd.ps.filter)

Now for every printjob spooled using lpr a control-d will be added to the
end.  Problem solved!

Of course if you print directly to the serial port (eg cat > /dev/ttyS0)
then you will still need to add the control-d manually

Hope this helps.
--
                                Stephen Harris

      The truth is the truth, and opinion just opinion.  But what is what?
  * Meeeeow ! Call  Spud the Cat on > 01268 515441 < for free Usenet access *

 
 
 

1. Printer prints from ttyS0 (modem port), but how from ttyS1 (printer port)?

My system works.  Finally.  :)

Now, I'd like it to make sense when I'm plugging things in the back
of the computer.

Currently my HP DeskWriter is plugged into the modem port of my 8500/G3
running LinuxPPC 2.2.18.  However, when I try to switch to ttyS1 (which I'm
assuming is the printer port) and plug the printer into the printer port,
I get garbage when printing test pages from printtool.

Plug it back into the modem port, and go back to ttyS0, everything is
fine again.

Is ttyS1 *not* the PrinterPort?

Tks,
patrick

2. reset colors

3. PRINTING POSTSCRIPT TO NON-POSTSCRIPT PRINTER - help...

4. Linux is gonna stay "free", right?

5. print postscript file to non-postscript printer

6. Dynamically receive IPs

7. Postscript or non-postscript printer?

8. HardDisk Sharing Method?

9. convert postscript jop to non-postscript printer

10. Printing Postscript files on a NON-postscript printer

11. RedHat 7.2, KDE printing postscript on non-postscript printers

12. Printing postscript on non-postscript printers

13. HELP: Print PostScript file on Non-PostScript-Printer