*BSD News Article 36499


Return to BSD News archive

Xref: sserve comp.periphs.printers:14605 comp.os.ms-windows.networking.misc:1446 comp.os.ms-windows.misc:33446 comp.unix.bsd:15024 comp.unix.misc:14219 comp.os.os2.misc:106577
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!gmi!usenet.eel.ufl.edu!eng.ufl.edu!spool.mu.edu!sgiblab!chronos.synopsys.com!news.synopsys.com!jgreely
From: jgreely@synopsys.com (J Greely)
Newsgroups: comp.periphs.printers,comp.os.ms-windows.networking.misc,comp.os.ms-windows.misc,comp.unix.bsd,comp.unix.misc,comp.os.os2.misc
Subject: Re: How to remove Ctrl-D from PostScript output (lpr)?
Date: 3 Oct 94 11:56:31
Organization: Synopsys, Inc., Mt. View, CA 94043
Lines: 19
Distribution: inet
Message-ID: <JGREELY.94Oct3115631@kencyr.synopsys.com>
References: <36a251$kkj@csdsun2.arlut.utexas.edu>
	<36ftom$5ng@news.service.uci.edu> <36p51g$gfm@emalpha2.em.doe.gov>
NNTP-Posting-Host: kencyr.synopsys.com
In-reply-to: thomas.eden@em.doe.gov's message of 3 Oct 1994 14:38:40 GMT

In article <36p51g$gfm@emalpha2.em.doe.gov> thomas.eden@em.doe.gov
 (Thomas Eden) writes:
>As Unix uses the Ctrl-D to signify the end of the input string (EOF)
>to the printer, this can really hose things up for printing to an LPR
>controlled printer from Windows.

Your workaround is correct; the explanation (invented by someone at
Microsoft), however, is wrong.  The Control-D means *nothing* to Unix
machines, which do not use any character to signify EOF.  The usual
cause of the problem is when a spooler attempts to figure out whether
the file to be printed is PostScript or text, and as the canonical
test for this is checking for "%!" as the first two characters of the
file, the presence of a leading Control-D hoses things nicely.

  Control-D's should never be inserted in any PostScript file that is
not being sent directly to a PostScript printer connected via a serial
or parallel port.
--
J Greely (jgreely@synopsys.com)