SUMMARY: Adding filter to SPARCprinter

Date: Sun Oct 31 1993 - 14:19:23 CST

<----RFC822 headers-----
Received: from ([]) by with SMTP
id <11670>; Tue, 7 Sep 1993 01:57:48 -0700
Received: by id AA13207
  (5.65c/IDA-1.4.4 for sun-managers-outbound); Mon, 6 Sep 1993 20:14:07 -0500
Received: from by with SMTP id AA13201
  (5.65c/IDA-1.4.4 for <>); Mon, 6 Sep 1993 20:14:04
Precedence: bulk
Received: from ( by with
SMTP id AA20564
  (5.65c/IDA-1.4.4 for <>); Mon, 6 Sep 1993 20:13:56
Received: from ([]) by
        id AA03157; Mon, 6 Sep 93 09:16:00 CST
From: (Stephen Fitzgerald)
Reply-To: (Stephen Fitzgerald)
Followup-To: junk
Redistributed: xeroxsun-managers:all areas:Xerox
-----RFC822 headers---->

Hi all - the list comes through again.

My original question is at the end of this summary.

The solution I required turned out to be very simple to implement. All I did
was edit /etc/magic to include the ^D%! "magic number" as a type of
postscript document on the SPARCs hosting the SPARC printers.

Some people suggested the use of a dummy printer entry as a means of adding
a filter. The following is one method suggested by James Dang which can be
adpated to add filters of your choice,

1. Create a dummy printer called "lwsparc" say. You need to create a spool
   directory as well e.g. /var/spool/lwsparc

2. The /etc/printcap of the printer server will look something like :

        lwsparc|sparcdos|Sparc Laserwriter with dos filter:\


        sparc|Sun Sparcprinter NEWSprint printer:\

3. The script for /usr/local/lib/lwsparc.filt is :

        # this filter will strip off CTRL-D created in DOS environment.

                sed '1s///1' | /usr/ucb/lpr -Psparc

        Somehow you have to actually type in Crtl-D in the substitution of
        the "sed" command.

4. "lwsparc" is dummy on unix side, but should be a printing queue on dos side.

A number of people suggested editting the win.ini file
on the PCs to include CntlD=0, I have passed this fix onto our PC people.
Apparently some users were aware of it, some not.

Thanks to the following who replied. (Michael G. Harrington)
Ike Stoddard <> (Carl Hughey) (Luiz Claudio Schara Magalhaes) (Fazeel Mufti) (James Terry) (Nico Vercammen) (Syed Zaeem Hosain)
Dan Stromberg <> (Danny Johnson)
carlm@QAL.Berkeley.Edu (Carl Mason)
Benoit Lefebvre <>
James Dang <>
Mr T Crummey <> (Doug Jones) (Zdenek Dospisil)

Original Question

Hi all,
        can anyone shed some light on this problem I am having with NeWSprint
2.1 and an IPC running 4.1.2.

        Some postscript files produced from MS Windows contain Control-D as the
first character. This contrl-D causes the SPARCprinter and NeWSprint to
select the incoming file as an ASCII file, since it has not detected the
%! as the first chars in the postscript file. The PCs producing these files
are running a mix of PC-NFS, Novell and NCSA-telnet, and are on our network.

        I wish to filter out the control-D so that these postscript files will
print successfully (instead of the raw postscript).

        I have a filter which does the task I want but I cannot incorporate
it into the SPARCprinter's printcap entry. I tried a script that called my
filter, then the standard if filter, but this did not work. I tried defining
a remote printer which had as its if entry the filter I want to use, this
also failed.

        I cannot use my filter without causing the lpd_script to fail.

MY QUESTION : Has anyone else solved this problem or added a filter to the
              SPARCprinter successfully.

I will summarise.

Stephen Fitzgerald E-mail:
Maritime Operations Division Phone : +61 8 259 5992
DSTO Salisbury, South Australia Fax : +61 8 259 5139

  _--_|\ _/_/_/_/ _/_/_/_/ _/_/_/ _/ _/ _/ _/_/_/_/
 / \ _/ _/ _/ _/ _/ _/ _/_/ _/ _/
 \_.--*_/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/_/
       v _/ _/ _/ _/ _/ _/_/ _/_/ _/
          _/_/_/_/ _/ _/ _/_/_/ _/ _/ _/_/_/_/

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:27 CDT