Return to BSD News archive
Xref: sserve comp.periphs.printers:14489 comp.os.ms-windows.networking.misc:1414 comp.os.ms-windows.misc:33235 comp.unix.bsd:14992 comp.unix.misc:14173 comp.os.os2.misc:106201 Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!swrinde!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: 30 Sep 94 11:46:29 Organization: Synopsys, Inc., Mt. View, CA 94043 Lines: 30 Distribution: inet Message-ID: <JGREELY.94Sep30114629@kencyr.synopsys.com> References: <36a251$kkj@csdsun2.arlut.utexas.edu> <36ftom$5ng@news.service.uci.edu> NNTP-Posting-Host: kencyr.synopsys.com In-reply-to: jrefling@rosslare.ece.uci.edu's message of 30 Sep 1994 02:39:18 GMT In article <36ftom$5ng@news.service.uci.edu> jrefling@rosslare.ece.uci.edu (John Refling) writes: >I don't believe that the control-d switches the printer out of >postscript, but rather just ends the current job. The most likely culprit is file-type detection, either in the spooler or the printer. Anything that looks for "%!" at the beginning of the file to identify PostScript files will fail if it finds a leading Control-D, and assume that the file is text. >I always give all our laser writers (I, I plus, NT, not using II at >the moment) a control-d at beginning and end of the job, to clear >whatever has happened before or during the current job. Control-D does in fact do this when speaking to the printer over a serial or parallel line. It is an error to send it over a TCP/IP or AppleTalk connection (both of which are capable of detecting EOF without the Control-D). It is an error for Windows to generate a Control-D in a PostScript file unless it is sending the file directly to a printer connected by a serial or parallel line. Microsoft belatedly realized this and added the "ctrld=0" flag to the print driver (documented in \windows\printers.wri, with a gloriously incorrect explanation of the problem it's solving). In Windows 95, rather than fixing the basic problem and providing a functional print spooler, they have added checkboxes to the print dialog to optionally fail to generate the offending Control-D characters, fore and aft. It ain't perfect, but it works. -- J Greely (jgreely@synopsys.com)