Path: utzoo!attcan!uunet!husc6!mailrus!eecae!cps3xx!usenet From: usenet@cps3xx.UUCP (Usenet file owner) Newsgroups: comp.sys.mac Subject: Re: Macintosh and Printers Message-ID: <788@cps3xx.UUCP> Date: 7 Oct 88 03:54:06 GMT References: <15098@agate.BERKELEY.EDU> Reply-To: rang@cpswh.cps.msu.edu (Anton Rang) Distribution: na Organization: Michigan State University, Computer Science Dept. Lines: 55 In-reply-to: steve@violet.berkeley.edu's message of 6 Oct 88 23:24:05 GMT In article <15098@agate.berkeley.edu>, Steve Goldfield (steve@violet.berkeley.edu) writes: > When I got my Imagewriter LQ, I diligently read the manual > and found the control code to reset the form length (it wasn't > easy to find since it only appears on a fold-out card in the > back and has a typically cryptic explanation of its critical > parameters). So I programmed those (and other control codes > to control the quality of printing) into my McMax program, and > to my horror found that nothing I had sent was having any > effect except to print strange characters on the printer. > > After frantically calling several sources, including Apple > Customer Relations, I've been informed that the Macintosh > system prevents me as a user from controlling the printer, > that the printer can only be controlled through its driver, > and that to do what I want I'd have to write a custom driver, > which is an extremely demanding project. There are at least two ways to get around this. The first is not to use the printer driver at all--just use the serial port driver (.Bout). This is probably the simplest and best way, if you just want to send stuff directly to the printer. Chapter 9 of IM Vol. 2 has information on this. You can also send codes to the printer using the printer driver, with the appropriate PrCtlCall (IM vol. 2, ch. 5, p. 165). I'm not sure how this would interact with PrOpenPage and PrClosePage, though (haven't done it myself). > Why couldn't the existing driver > have been written in such a way as to pass user-generated > control codes on unchanged to the printer? Because printer control codes can overlap with the character set (ESC may have a printable form in some fonts). More generally, because printer imaging is usually done via a GrafPort and drawing calls, not through text handling at all. > So, in summary, if this limitation is an intentional part of the > Macintosh design, I ask Apple (or anyone else who wants to > comment), why was such a design chosen for the system? Because it helps prevent application writers from coming up with printer-dependent code (otherwise we might have seen hordes of programs which only worked on the ImageWriter). This way, the printer manufacturer just needs to supply a driver, and the application needs to call it in standard ways--you don't need the lists of hundreds of printers that IBM word processors (to pick an example) support. > Steve Goldfield Anton Rang (rang@cpswh.cps.msu.edu) +----------------------------------+------------------------+ | Anton Rang (grad student) | "VMS forever!" | | Michigan State University | rang@cpswh.cps.msu.edu | +----------------------------------+------------------------+