🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #8496

Re: ^D embedded in PS files

#8496
From: Glenn Reid
Date: Thu, 25 May 1989 18:23
94 lines
4743 bytes
In article <A05B438E08C6CA70@UK.AC.CAM.PHX> CET1@phoenix.cambridge.ac.UK (Chris Thompson) writes:
>Glenn Reid writes:
>> The end-of-file (it isn't always a ^D) is echoed by the printer when
>> an EOF is read from the input stream.
>and
>> I think the EOF is echoed then, by the scanner, rather than after the
>> "showpage" name has been executed, but I'm not sure of it. In any
>> case, it is an implementation detail.
>and much else in the same vein.
>
>I suppose it is foolish of me to argue with someone from Adobe about
>their own software, but I think Glenn is just plain wrong about this.

I was mistaken.  You're right.  ["I'm left, she's gone..."]

>The ^D (EOT) character is sent *from* the printer as part of the
>server loop, in the finish-off-the-current-job code, before it starts
>to think about where to get the next job from. Reaching the EOT in
>the input buffer just causes the scanner (or anyone else reading
>"currentfile") to see end-of-file (and you can't get past it, at least,
>not without trickery). Nothing is sent from the printer at this stage.

This is correct; it is handled by the server loop when the output file
stream is closed.  Closing a file causes the appropriate EOF to be
written.

>As Glenn points out, if this wasn't the case then the ^D's wouldn't
>properly delimit the error messages produced by different jobs, and
>in fact they do. (I suppose I should add: on a LaserWriter, rev 0 or
>2; but surely this can't be a matter of different implementations on
>different printers?)

It's the same on all the printers that support serial communications.
My error. Sorry about that.

>As others have pointed out, it would be unwise to assume that the
>^D from the printer meant "I have printed that job perfectly" rather
>than "I have told you all I am ever going to tell you about that job",
>but at least it does mean the latter.

Right.  Whether the job was printed to the user's satisfaction is a
different issue than whether the job was printed to the printer's
satisfaction.  For example, many printers are happy to substitute
Courier for unknown fonts.  A message is sent back to the host to
indicate this substitution, but a job printed in a default font is
usually not to a user's satisfaction, and should be reprinted with the
correct fonts downloaded or perhaps the whole print job should be
rejected by the spooler as unprintable, depending on the user's wishes.

It is complicated, isn't it?  Maybe we should rehash the simple issues
of what should be done, rather than the implementation details.  Here's
my opinion about it:

	1.  Page composition software composes page, selecting
	    fonts (by name), placing images and text at arbitrary
	    locations in user space.

	2.  Page composition software produces device-independent
	    PostScript language file representing imaging
	    instructions required to paint the above-mentioned
	    page, and puts %%Comments in place to indicate the
	    proper media and font requirements of the print file.

	3.  This file is handed to a print spooler, which attempts
	    to resolve the printer-dependent issues like media
	    selection and perhaps downloading of fonts, depending
	    on the document requirements.  A more refined print
	    file is produced, where the %%Comments are resolved
	    for the particular intended printer.  More %%Comments
	    are put surrounding the printer-dependent code, so
	    that the process can be repeated by another spooler
	    if necessary.

	4.  The spooler opens a communication channel with the
	    chosen printer.

	5.  The spooler transmits the file to the printer, monitoring
	    status, watching for %%[ Error ]%% messages, and other
	    appropriate things.

	6.  The spooler sends the appropriate EOF indication
	    at the end of the job, based on (4).

	7.  The spooler waits for confirmation of the job, in the
	    form of an echoed EOF, from the printer.  Any errors
	    are logged or sent back to the original submittor.
	    Job accounting may take place (counting pages, looking
	    at wristwatch, etc.)

No doubt this will stir further controversy somehow, but it does seem
to be an important issue.

Glenn Reid
Adobe Systems
Technical Details
Message-ID: <864@adobe.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!adobe!greid
References: <A05B438E08C6CA70@UK.AC.CAM.PHX>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!adobe!greid
From: greid@adobe.com (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: ^D embedded in PS files
Message-ID: <864@adobe.UUCP>
Date: 25 May 89 18:23:39 GMT
References: <A05B438E08C6CA70@UK.AC.CAM.PHX>
Sender: news@adobe.COM
Reply-To: greid@adobe.COM (Glenn Reid)
Organization: Adobe Systems Incorporated, Mountain View
Lines: 94