[comp.lang.postscript] EOF indication to PostScript printer

seymour@milton.u.washington.edu (Richard Seymour) (07/24/90)

In article <5556@sunquest.UUCP> terry@sunquest.UUCP (Terry Friedrichsen) writes:
>Help!  I've R'ed The FM's until my blood pressure won't take it any more.
  <a not uncommon problem with many manuals>
>EVERY ONE of them talks about what happens when the printer "receives an
>EOF indication" (we use the serial interface), ....
>
>NONE of the blasted books tell me what in bloody blue (green, red) blazes
>to SEND DOWN THE SERIAL LINE to give the printer this mystical, magical
>"EOF indication"!!!  What is the big secret here, anyway?  I'm an adult;
>I promise not to go blabbing it on the playground.
  Red Book:  page 290  Appendix D: Apple LaserWriter
    the paragraph just below the table.
>
>If I've missed it in these books, my apologies.  I've looked in every part
>of the books that the index thought had some relevancy to files; none will
>reveal the secret.
  Without having one on hand to check, i think it's in the QMS book, too.

  The Apple LaserWriter II/NTX book only mentions it in the Diablo
Emulation section (cute!) page 117, 3rd paragraph
  "The LaserWriter II interprets the Control-D key combination as an
   end-of-file command."
Receipt of the control-D is what stops the "stuff coming in" light 
 from flashing.

>Terry R. Friedrichsen
>uunet!sunquest!terry
>TERRY@SUNQUEST.COM
>TERRY@SDSC.EDU  (alternate address; I live and work in Tucson)
 i don't
good luck
--dick

woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) (07/25/90)

In article <5556@sunquest.UUCP>, terry@sunquest.UUCP (Terry Friedrichsen) writes:
> Help!  I've R'ed The FM's until my blood pressure won't take it any more.
> 
> I have a QMS PS-810 PostScript laser printer, and the green, blue, and red
> Adobe PostScript books, as well as the book for the QMS itself.  I've even
> opened all four books.
> 
> EVERY ONE of them talks about what happens when the printer "receives an
> EOF indication" (we use the serial interface), and you can even find
> example PostScript code to detect it.  All the books then blithely continue
> the narrative, as if they have revealed all, and you are therefore ready
> to proceed to the next topic.
> 
> NONE of the blasted books tell me what in bloody blue (green, red) blazes
> to SEND DOWN THE SERIAL LINE to give the printer this mystical, magical
> "EOF indication"!!!  What is the big secret here, anyway?  I'm an adult;

I've looked for it in vain also.  For a fact, ^D i.e. 0x04 will terminate
a job, but I'm not sure about the EOF.  I have a postscript PS-810 also.
I wrote a diablo emulator, as well as a simple epson emulator.  I finaly
took the approach of taking the CAN character (clear buffer  on an Epson)
and used it to drop into postscript so that I can escape the emulator,
drop into postscript, do things, then get back into the emualtor.  That 
worked fairly well.  If you invoke the HP emulation mode from software
(hplj ) you can toggle back to postscript with a ^D.  Adobe orginaly
told me that it was  0x7f 0x4  but I found that the 0x7f was not needed.
Since they are manipulating the port transparently, they check for ^D
outside of a graphics string and quit.

Cheers
Woody

I don't think it's an elementary question at all...

woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) (07/25/90)

In article <5398@milton.u.washington.edu>, seymour@milton.u.washington.edu (Richard Seymour) writes:
> In article <5556@sunquest.UUCP> terry@sunquest.UUCP (Terry Friedrichsen) writes:
>   Red Book:  page 290  Appendix D: Apple LaserWriter
>     the paragraph just below the table.
My copy of the RED book has the index on page 290, and appendix D is
only 2 short pages, and makes no mention of the Laserwriter...
There has been some confusion in the past, with page numbers in the
red book.  The version that I have is the second printing, nov 1986.

You must have a older version of the red book?

Cheers
Woody

henry@zoo.toronto.edu (Henry Spencer) (07/26/90)

In article <1423@chinacat.Unicom.COM> woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) writes:
>>   Red Book:  page 290  Appendix D: Apple LaserWriter
>>     the paragraph just below the table.
>My copy of the RED book has the index on page 290, and appendix D is
>only 2 short pages, and makes no mention of the Laserwriter...
>There has been some confusion in the past, with page numbers in the
>red book.  The version that I have is the second printing, nov 1986.
>
>You must have a older version of the red book?

Yes, there have been at least two versions.  (We've got one of each here.)
Interestingly, mine (*with* the LW appendix) is sixth printing, April 1987.

The general answer to "how do I talk to my printer" is "the manual that
came with the printer is supposed to tell you".  (It's also supposed to
tell you about things like printer-specific operators.)
-- 
NFS:  all the nice semantics of MSDOS, | Henry Spencer at U of Toronto Zoology
and its performance and security too.  |  henry@zoo.toronto.edu   utzoo!henry

seymour@milton.u.washington.edu (Richard Seymour) (07/26/90)

In article <1423@chinacat.Unicom.COM> woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) writes:
>In article <5398@milton.u.washington.edu>, seymour@milton.u.washington.edu (Richard Seymour) writes:
>>   Red Book:  page 290  Appendix D: Apple LaserWriter
>>     the paragraph just below the table.
>My copy of the RED book has the index on page 290, and appendix D is
>only 2 short pages, and makes no mention of the Laserwriter...
>There has been some confusion in the past, with page numbers in the
>red book.  The version that I have is the second printing, nov 1986.
>
>You must have a older version of the red book?

yes, mine is an OLDER copy: labeled "second printing: december 1985"
with the print sequence code just above that as BCDEFGHIJ-HA-898765
(i believe that each letter gets chipped off as they update, so
  the next version would be CDE..., and i'll guess that the trailing
   numbers might be the year code)

... and i see by another posting that an April 1987 (6th printing)
  has the appendix too.

Imagine -- WOODY ends up being the person with the edition WITHOUT
the critical Appendix...

This almost reads like the time Eastern Airlines bumped Ralph Nader
by overbooking -- which was the seed which sprouted into the "they
owe you money and a free flight if they bump you" practice/rules
existing today.  But with software companies , WE get to pay for
upgrades (if we find out they exist).

(good luck) try
%% dick

hcochran@adobe.com (Holly Wanless Cochran) (07/26/90)

   I think I can explain the discrepancy in page numberings
and in apparently-missing indices in the Red Book.
   There are 2 versions of the Red Book. One has an appendix
that covers features specific to the Apple LaserWriter. This
is ISBN 0-201-10174-2. The other, ISBN 0-201-10169-6, does not
have the LaserWriter appendix. Exact page numbers may also
vary between these two versions.

--Holly Cochran
  Adobe Systems Inc.
  holly@adobe.com

zwicky@sparkyfs.istc.sri.com (Elizabeth Zwicky) (07/26/90)

If you check ISBN numbers, instead of printing dates, you will
discover that there are (at least) two Red Books; one of them includes
the LaserWriter appendix, and the other doesn't. I have never seen a
version with a printer-specific appendix that wasn't about the
LaserWriter, but that doesn't mean they don't exist. 

In any case, the non-printer-specific Red Book does not include the
EOF information because it isn't part of the language specification,
but instead part of the implementation. If you want EOF indicated by
having the user spin around three times, bang a coffee cup on the
table, and shout "Vive Quebec", you are free to do so if you can
figure out how to detect it. As long as you do the right thing when it
happens, you are still speaking PostScript. Most printers take a
control-D as an EOF indicator; most emulators take that, or whatever
the OS they're on takes as EOF or whatever indicates to them that
their connection has been closed. 

As for Woody-bashing, it might be less prevalent if he was more often
correct and less often strident. For instance, if instead of answering every
question he only answered those he actually knows the correct answer to.

	Elizabeth Zwicky

seymour@milton.u.washington.edu (Richard Seymour) (07/26/90)

In article <32478@sparkyfs.istc.sri.com> zwicky@quetzalcoatl.itstd.sri.com.UUCP (Elizabeth Zwicky) writes:
>If you check ISBN numbers, instead of printing dates, you will
>discover that there are (at least) two Red Books; one of them includes
>the LaserWriter appendix, and the other doesn't. 

my December 1985, Second Printing-with-Apple-Appendix is ISBN 0-201-10174-2
(addison-wesley, red, paperback, $22.95)

>having the user spin around three times, bang a coffee cup on the
>table, and shout "Vive Quebec", you are free to do so if you can
>figure out how to detect it. 
  ohhh -- i just love that!

>As for Woody-bashing, it might be less prevalent if he was more often
>correct and less often strident. For instance, if instead of answering every
>question he only answered those he actually knows the correct answer to.
   i hope my comment was taken as the compliment it was intended to be,
    not a "Woody-bash" at all

--dick

rickc@pogo.WV.TEK.COM (Rick Clements) (07/27/90)

In article <32478@sparkyfs.istc.sri.com> zwicky@quetzalcoatl.itstd.sri.com.UUCP (Elizabeth Zwicky) writes:
>happens, you are still speaking PostScript. Most printers take a
>control-D as an EOF indicator; most emulators take that, or whatever
>the OS they're on takes as EOF or whatever indicates to them that
>their connection has been closed. 

EOF indication is port specific.  Control-D is the EOF indicator for serial &
parallel.  Its a PAP EOF for AppleTalk.  (Its a packet not a character.)
-- 
Rick Clements (RickC@pogo.WV.TEK.COM)