Article View: comp.lang.postscript
Article #26Re: Sending special characters to serial connected LaserWriter
From: Vidiot
Date: Wed, 28 Oct 1992 05:26
Date: Wed, 28 Oct 1992 05:26
46 lines
2869 bytes
2869 bytes
In article <1992Oct26.202733.5318@island.COM> hue@coney.island.COM (Pond Scum) writes:
<
<I am working a piece of software similar to Adobe TranScript's pscomm
<and James Clark's lprps. I would like to be able to print files which
<contain binary data to a serially attached PostScript printer, but I
<cannot figure out how to send down the special characters (^A, ^C, ^D,
<^Q, ^S, ^T, and ^[) without them being interpreted as the special
<characters. I have a document titled "Adobe Serial and Parallel
<Communications Protocols Specification" and it says there is no way
<to send these characters to the printer if the printer only supports
<the standard protocol. I don't think my LaserWriter IINTX supports
<the binary protocol because when I type "100 setsoftwareiomode" at
<the interpreter I get a rangecheck error. I know that you can use the
<backslash escape inside a string, but I'm trying to print Mac PostScript
<files which contain sequences like the following:
<
<256 256 8
<[256 0 0 -256 0 256]
<{currentfile buf readstring pop}
<%%BeginBinary: 65542
<image
<<<A bunch of binary data>>
<
<
<I figure there must be a way to get this to work because I don't
<hear people complaining about not being able to print their Mac
<PostScript files via CAP because they contain binary data. If
<anyone can shed some light on this, I'd appreciate it.
You will need to send to output to a PostScript printer that has a parallel
port, and not a serial port. Binary data cannot be sent through a serial
port, plain and simple. Too many problems. Things like Xmodem work because
there is a program on each end that works with serial ports to transfer data
in binary (or what is know as Unix raw mode). But, with a printer, raw mode
can't be used, otherwise XON/XOFF woudln't work for software handshaking.
The cure is to run the PostScript program through another piece of code that
will convert the readstring to readhexstring and turn each binary character
into two hex characters. That will work just fine.
At least, that is what I would do.
--
harvard\ spool.cs.wisc.edu!astroatc!vidiot!brown
Vidiot ucbvax!uwvax..........!astroatc!vidiot!brown
rutgers/ INTERNET:vidiot!brown%astroatc.UUCP@spool.cs.wisc.edu
brown@wi.extrel.com
Technical Details
Message-ID:
<4353@vidiot.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!rutgers!uwvax!astroatc!vidiot!brownReferences:
<1992Oct26.202733.5318@island.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!jvnc.net!rutgers!uwvax!astroatc!vidiot!brown From: brown@vidiot.UUCP (Vidiot) Newsgroups: comp.lang.postscript,comp.periphs.printers,comp.protocols.appletalk Subject: Re: Sending special characters to serial connected LaserWriter Message-ID: <4353@vidiot.UUCP> Date: 28 Oct 92 05:26:11 GMT References: <1992Oct26.202733.5318@island.COM> Reply-To: brown@vidiot.UUCP (Vidiot) Organization: Vidiot's Hangout Lines: 46