1 HARDCOPY FACILITIES Interlisp-D includes facilities for generating hardcopy in both "Press" and "Interpress" formats. Press is a file format used for communicating documents to Xerox prototype laser Xerographic printers known by the names "Dover", "Spruce", "Penguin", and "Raven". Interpress is a file format used for communicating documents to Xerox Network System printers such as the Xerox 8044 and Xerox 5700. Files can be in a number of formats: Interpress and Press files, plain text files, and formatted Tedit files. In order to print a file on a given printer, it is necessary to identify the format of the file, convert the file to a format that the printer can accept, and transmit it. Rather than require that the user explicitly determine file types and do the conversion, the Interlisp-D hardcopy functions generate Press or Interpress output depending on the appropriate choice for the designated printer. The hardcopy functions use the variables PRINTERTYPES and PRINTFILETYPES (described below) to determine the type of a file, how to convert it for a given printer, and how to send it. By changing these variables, the user can define other kinds of printers and print to them using the normal hardcopy functions. (SEND.FILE.TO.PRINTER FILE HOST PRINTOPTIONS) [Function] The function SEND.FILE.TO.PRINTER causes the file FILE to be sent to the printer HOST. If HOST is NIL, the first host in the list DEFAULTPRINTINGHOST which can print FILE is used. PRINTOPTIONS is a property list of the form (PROP1 VALUE1 PROP2 VALUE2 ...). Properties can include: HEADING - a string to use on the top of each page; #COPIES - the number of copies of the file to print; #SIDES - if 2, select two-sided printing (if HOST can print two-sided copies); DOCUMENT.NAME - the 'name' of the document, which often appears on a cover sheet. For example, (SEND.FILE.TO.PRINTER 'FOO NIL '(#COPIES 3 #SIDES 2 DOCUMENT.NAME "For John")) SEND.FILE.TO.PRINTER calls PRINTERTYPE and PRINTFILETYPE to determine the printer type of HOST and the file format of FILE. If FILE is a formatted file (e.g., already in Press or Interpress format) in a form that the printer can print, it is transmitted directly. Otherwise, CONVERT.FILE.TO.TYPE.FOR.PRINTER is called to do the conversion. All of these functions use the lists PRINTERTYPES and PRINTFILETYPES to actually determine how to do the conversion. LISTFILES calls the function LISTFILES1 to send a single file to a hardcopy printing device. Interlisp-D is initialized with LISTFILES1 defined to call SEND.FILE.TO.PRINTER. Note: For backwards compatibility, the function EMPRESS is defined to pack its arguments into a list, and call SEND.FILE.TO.PRINTER. (HARDCOPYW WINDOW/BITMAP/REGION FILE HOST SCALEFACTOR ROTATION PRINTERTYPE) [Function] Creates a hardcopy file from a bitmap and optionally sends it to a printer. WINDOW/BITMAP/REGION can either be a WINDOW (open or closed), a BITMAP, or a REGION (interpreted as a region of the screen). If NIL, the user is prompted for a screen region using GETREGION. If FILE is non-NIL, it is used as the name of the file for output. If HOST=NIL, this file is not printed. If FILE is NIL, output is sent to HOST. If HOST is NIL, the first host on DEFAULTPRINTINGHOST of the type PRINTERTYPE is used. To save an image on a file without printing it, perform (HARDCOPYW IMAGE FILE). To print an image without saving the file, perform (HARDCOPYW IMAGE), or, to send it to a specific printer, (HARDCOPYW IMAGE NIL PRINTER). SCALEFACTOR is a reduction factor. If not given, it is computed automatically based on the size of the bitmap and the capabilities of the printer type. ROTATION specifies how the bitmap image should be rotated on the printed page. Most printers (including current INTERPRESS and PRESS) only support a ROTATION of multiples of 90. PRINTERTYPE specifies what 'kind' of printer to use in environments that have more than one kind of printer around. For example, if you specify PRINTERTYPE to be PRESS or INTERPRESS, HARDCOPYW will use that information to select which printer to use or what print file format to convert the output into. If PRINTERTYPE is NIL, it defaults to INTERPRESS. Note that the "Hardcopy" command in the background menu merely evaluates (HARDCOPYW), which prompts the user for a region on the screen, and sends the image to the default printer. The "Hardcopy" command in the paint menu performs (HARDCOPYW WINDOW), which sends an image of the whole window to the default printer. DEFAULTPRINTINGHOST [Variable] The variable DEFAULTPRINTINGHOST is used to designate the default printer to be used as the output of printing operations. It should be a list of the known printer host names, for example, (QUAKE LISPPRINT:). If an element of DEFAULTPRINTINGHOST is a list, is interpreted as (PRINTERTYPE HOST), specifying both the host type and the host name. The type of the printer, which determines the protocol used to send to it and the file format it requires, is determined by the function PRINTERTYPE. If DEFAULTPRINTINGHOST is a single printer name, it is treated as if it were a list of one element. (PRINTFILETYPE FILE) [Function] Returns the format of the file FILE. Possible values include PRESS, INTERPRESS, TEDIT, etc. If it cannot determine the file type, it returns NIL. Uses the global variable PRINTFILETYPES. (PRINTERTYPE HOST) [Function] Returns the type of a printer HOST. Currently uses the following simple heuristic: printers whose name have a colon in them (e.g., PRINTER:PARC:XEROX) are assumed to be INTERPRESS printers. If HOST is a list, the CAR is assumed to be the printer type and CADR the name of the printer, e.g., (PRESS LASSEN). Otherwise, the printer is assumed to be the type which is the value of DEFAULTPRINTERTYPE, initially PRESS. PRINTERTYPES [Variable] The characteristics of a given printer are determined by the value of the list PRINTERTYPES. Each element is a list of the form (TYPES (PROPERTY1 VALUE1) (PROPERTY2 VALUE2) ...) TYPES is a list of the printer types that this entry addresses. The (PROPERTYn VALUEn) pairs define properties associated with each printer type. PRINTERTYPES initially contains entries for the printer types INTERPRESS (or 8044), PRESS (SPRUCE, PENGUIN, DOVER), FULLPRESS (RAVEN). The printer properties include CANPRINT - a list of the file types that the printer can print directly; STATUS - a function that knows how to find out the status of the printer, used by PRINTERSTATUS; PROPERTIES - a function which returns a list of known printer properties; SEND - a function which invokes the appropriate protocol to send a file to the printer; BITMAPSCALE - a function of arguments WIDTH and HEIGHT in bits which returns a scale factor for scaling a bitmap; and BITMAPFILE - a form which, when evaluated, converts a BITMAP to a file format that the printer will accept. PRINTFILETYPES [Variable] The variable PRINTFILETYPES contains information about various file formats, such as Tedit files, Press files, and Interpress files. The format is similar to PRINTERTYPES. The properties that can be specified include TEST - a function which tests a file if it is of the given type; CONVERSION - a property list of other file types and ways to convert from one to the other; and EXTENSION - a list of possible file extensions for files of this type. Hardcopy output may also be obtained by writing a file on the printer device LPT, e.g. (COPYFILE 'FOO '{LPT}). When a file on this device is closed, it is converted to Press or Interpress format (if necessary) and sent to the default printer (the first host on DEFAULTPRINTINGHOST). Thus, {LPT} acts like the device LPT: in Interlisp-10. One can include the printer name directly in the file name, e.g. (COPYFILE 'FOO {LPT}QUAKE) will send the file to the printer QUAKE.  TIMESROMAN (NILNIL TIMESROMAN  TIMESROMAN  NILNIL TIMESROMAN  NILNIL& TIMESROMAN GACHA  TIMESROMAN GACHA ï TIMESROMAN GACHA $ $NILNILGACHA  TIMESROMANGACHA  TIMESROMAN \\NILNIL TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN\\ NILNIL TIMESROMAN TIMESROMAN GACHA  TIMESROMANGACHA  TIMESROMANGACHA  TIMESROMANGACHA  TIMESROMANGACHA  TIMESROMAN GACHA , TIMESROMAN GACHA . TIMESROMAN GACHA ' TIMESROMAN  TIMESROMAN TIMESROMAN GACHA R TIMESROMAN GACHA \\ NILNILGACHA \\NILNIL3GACHA \\ NILNILGACHA  TIMESROMAN GACHA  TIMESROMAN GACHA " TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN‘ TIMESROMAN GACHA G TIMESROMAN GACHA  TIMESROMAN GACHA 0 TIMESROMAN GACHA \\ NILNIL GACHA  TIMESROMAN GACHA W TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN \\ NILNIL1 TIMESROMAN GACHA 8 TIMESROMAN GACHA  TIMESROMAN GACHA $ $NILNIL GACHA ? TIMESROMANGACHA  TIMESROMAN \\NILNILM TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA . TIMESROMAN GACHA 1 TIMESROMAN GACHA  TIMESROMAN \\ NILNIL TIMESROMAN  TIMESROMAN TIMESROMAN GACHA 5 TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN \\ NILNIL TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA TIMESROMAN TIMESROMAN TIMESROMAN \\ NILNIL8 TIMESROMAN GACHA  TIMESROMANGACHA  TIMESROMANGACHA 6 TIMESROMAN GACHA  TIMESROMANGACHA ( TIMESROMAN GACHA  TIMESROMANGACHA  TIMESROMANGACHA  TIMESROMAN  TIMESROMAN\\ NILNIL TIMESROMAN TIMESROMAN  TIMESROMAN\\ NILNIL TIMESROMANi TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN\\ NILNIL TIMESROMAN† TIMESROMAN TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA t TIMESROMAN TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN \\ NILNILI TIMESROMAN GACHA ” TIMESROMAN GACHA  TIMESROMANGACHA B TIMESROMAN GACHA $ $NILNILGACHA  TIMESROMAN \\NILNIL TIMESROMAN GACHA ž TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA TIMESROMANGACHA  TIMESROMANGACHA ½ TIMESROMAN GACHA  TIMESROMAN \\ NILNIL TIMESROMAN GACHA M TIMESROMAN GACHA $ $NILNILGACHA  TIMESROMANGACHA  TIMESROMAN \\NILNIL TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA 9 TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA $ $NILNIL GACHA  TIMESROMANGACHA  TIMESROMAN \\NILNIL TIMESROMAN  TIMESROMANb TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN TIMESROMAN GACHA ' TIMESROMAN GACHA TIMESROMAN GACHA J TIMESROMAN GACHA TIMESROMAN GACHA  TIMESROMAN GACHA $ $NILNIL GACHA  TIMESROMAN \\NILNILO TIMESROMAN GACHA % TIMESROMAN GACHA \\ NILNILGACHA  TIMESROMANGACHA TIMESROMANGACHA  TIMESROMANGACHA TIMESROMANGACHA  TIMESROMANGACHA  TIMESROMAN\\ NILNIL TIMESROMAN@ TIMESROMAN GACHA TIMESROMANGACHA  TIMESROMANGACHA ; TIMESROMAN GACHA \\ NILNIL GACHA 2 TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN GACHA  TIMESROMAN \\ NILNIL TIMESROMAN GACHA A TIMESROMAN GACHA L TIMESROMAN GACHA  TIMESROMAN GACHA @ TIMESROMAN GACHA T TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN TIMESROMAN  TIMESROMAN@ TIMESROMAN GACHA , TIMESROMAN GACHA 0 TIMESROMAN GACHA $ $NILNILGACHA  TIMESROMAN \\NILNIL TIMESROMAN GACHA „ TIMESROMAN GACHA 0 TIMESROMAN GACHA = TIMESROMAN GACHA V TIMESROMAN GACHA > TIMESROMAN  NILNILM TIMESROMAN GACHA  TIMESROMAN GACHA ™ TIMESROMAN  TIMESROMAN TIMESROMAN GACHA  TIMESROMAN GACHA T TIMESROMAN GACHA # TIMESROMAN GACHA  TIMESROMAN š(DEFAULTFONT 1 (GACHA 10 (MEDIUM REGULAR REGULAR) 0 DISPLAY) (GACHA 8 (MEDIUM REGULAR REGULAR) 0 DISPLAY) (TERMINAL 8 (MEDIUM REGULAR REGULAR) 0 DISPLAY)) Äzz¸