home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / tech / printer_.inf < prev    next >
Encoding:
Text File  |  1985-10-03  |  3.8 KB  |  84 lines

  1. 29-Sep-85 16:34:31-PDT,3982;000000000005
  2. Return-Path: <mss%dartmouth.csnet@CSNET-RELAY.ARPA>
  3. Received: from CSNET-RELAY.ARPA by SUMEX-AIM.ARPA with TCP; Sun 29 Sep 85 16:34:23-PDT
  4. Received: from dartmouth by csnet-relay.csnet id ab09829; 29 Sep 85 19:25 EDT
  5. Received: by dartmouth.CSNET (4.12/1.20) id AA02021; Sun, 29 Sep 85 12:43:36 edt
  6. Date: 29 Sep 1985 12:40-EST
  7. From: mss%dartvax%dartmouth.csnet@CSNET-RELAY.ARPA
  8. Subject: More information about writing printer servers
  9. To: info-mac-request@sumex-aim.ARPA
  10. Message-Id: <496860000/mss@dartvax>
  11.  
  12. In response to my request for printer driver info, I received the following
  13. from leo@Apple. Would you please place it into the printer driver
  14. information file you created? (I checked with leo and he said it was OK--he
  15. didn't send it out to the info-mac because he thought that most people
  16. would not be interested.)
  17.  
  18.         -Mark
  19.  
  20. From leo@APPLE Mon Sep 23 20:31:51 1985
  21. Date: Wed, 18 Sep 85 01:19:13 pdt
  22. From: Leo Hourvitz <leo@APPLE>
  23. Posted-Date: Wed, 18 Sep 85 01:19:13 pdt
  24. To: mss%dartvax%dartmouth.csnet@CSNET-RELAY
  25. Subject: Printer Support for the Rest of Us
  26.  
  27. Mark; 
  28.  
  29. Here's a quick description of the Mac's Printing Architecture (and I DO use
  30. the word architecture somewhat loosely).
  31.  
  32. There are two ways to print, known as the high-level and low-level printing
  33. interfaces.  In the high-level printing interface, the program calls all
  34. those printing routines defined in Inside Mac, like PrOpen, PrOpenDoc,
  35. PrOpenPage, and so forth, and gets back a printing GrafPort.  The program
  36. then calls QuickDraw routines to draw into this GrafPort, but instead of
  37. being drawn in some BitMap somewhere, the drawings come out on the printer.
  38.  
  39. If a program is using the low-level interface, then instead of making the
  40. calls to PrOpenDoc, it makes control calls on the .Print driver (driver
  41. refNum -3).  These calls have a csCode parameters that gives the type of
  42. control call being made, which are the types of calls you mentioned: Here's
  43. a BitMap, here's a stream of text, etc.
  44.  
  45. A single program never uses both levels of the interface.  The sampling of
  46. real programs is that MacPaint uses the low-level interface, and everybody
  47. else uses the high-level interface.
  48.  
  49. When people refer to the ImageWriter driver, they're usually referring to
  50. the ImageWriter resource file, which actually contains two pieces of code,
  51. corresponding to the two levels of interface:  one is a driver, as per the
  52. device manager, that supports the low-level interface.  The other thing in
  53. the printer resource file is a series of PDEF resources (fairly undocumen-
  54. ted) that contain the code to implement the high-level interfaces.  The way
  55. that the high-level interface is implemented is by installing a new set of
  56. procedures in QuickDraw's StdProcs (in QuickDraw manual, pg. 70) that get
  57. called whenever the application draws into the printing grafPort.
  58.  
  59. The low-level interface provided by the driver is pretty much as straight-
  60. forward as you mentioned.  It gets a few more control calls then just
  61. BitMap, chars, and carriage return; there are also control calls for
  62. OpenDoc, OpenPage, etc.; but basically, the low-level one is simple.
  63.  
  64. The only people who have written real-live Printer Drivers, as far as I
  65. know, are 1) Apple, 2) Aldus, and 3) Orange Micro is trying.  There may be
  66. some others... Macintosh Tech Support, I believe, has a Tech Note with more
  67. details on writing a printer driver, but I don't know how you'd go about
  68. getting it from them (though their number is 408 973 3400)(if you have any
  69. other connection, try it).
  70.  
  71. Unfortunately, having looked at the task before (and with the advantage of
  72. having access to the source of the ImageWriter driver), writing a real
  73. printer file is a heavy-duty task; not impossible, but not a two-weekender.
  74. I think just doing the low-level interface, giving you MacPaint at least,
  75. wouldn't be too bad...
  76.  
  77. Good luck!
  78.  
  79. Leovitch
  80.  
  81. Leo Hourvitz
  82. Apple Computer, Inc.
  83. leo@apple.csnet
  84.