APPLICATION NOTE #177 USING CANON'S LBP-8 MARK III AND LBP-4 PRINTERS WITH XYWRITE This application note contains some tips for using Canon's LBP-8 Mark III and LBP-4 printers with XyWrite III Plus, Version 3.55 or later. It answers the questions most frequently asked of XYQUEST's Technical Services department regarding the Mark III and LBP-4. CANON'S LBP-8 MARK III and LBP-4 The LBP-8 Mark III, manufactured by Canon, is a laser printer with 1536K of memory; the LBP-4 has 512K. Additional memory can be installed in each printer. Each printer has two slots for loading Canon font cards. The printers support Canon's bit-mapped and scalable font cards, as well as internal fixed pitch and scalable fonts. Bit-mapped fonts are available in limited point sizes; such as 6, 8, 10, 12, 14, 18, and 29 point. Scalable fonts can be ``scaled'' to any point size. Both printers contain the following 13 internal fonts: 10 Courier, 10 Courier Bold, 10 Courier Italic, 17 Courier, Dutch, Dutch Bold, Dutch Italic, Dutch Bold Italic, Swiss, Swiss Bold, Swiss Oblique, Swiss Bold Oblique, and Symbol. The pitch of the four Courier fonts is fixed. The remainder are all scalable proportional fonts. The LBP printers allow you to print documents in either portrait or landscape mode. You can also mix modes on the same page. In portrait printing (also called standard printing), characters are printed across the 8-1/2-inch dimension of the page. In landscape printing, characters are printed across the 11-inch dimension of the page. All of the fonts mentioned above print in both portrait and landscape modes, which doubles the number of available fonts. The control panel of each printer provides a printing menu which allows you to set values for printing options. TEST PRINT A will print the current default settings. To use the XyWrite printer files described in this application note, be sure that each of these options is set as follows: Graphic set IBMR1 Primary font I0001 Command ISO All of XyWrite's LBP printer files describe how to change to these settings. FORM DEPTH Neither printer allows you to access the entire width and length of a sheet of paper. Each one ``steals'' about 1/3 inch from both the top and bottom margins and about 1/4 inch from the left and right margins. This means that you have to adjust the Left Margin (LM) and Form Depth (FD) commands which are embedded in your document~. For example, to get a 1-inch left margin, set the LM command to 8 (rather than the standard LM 10). The cumulative loss at the top and bottom margins means you cannot get more than 62 lines on a standard 8-1/2 x 11 sheet of paper. Therefore, we have set Form Depth (FD) to 62 in the printer files. PRINTER CONTROL CODES All printer files contain a Printer Control (PC) table that enables you to access various paper trays; perform manual paper feed operations; and print fonts in either a portrait or a landscape orientation. Normally, you use the PC command to invoke PC codes at a particular point in your text file. However, LBP printers process PC codes in a way that conflicts with the TP and RH commands. Therefore, XYQUEST has developed the Page Begin (PB) command which changes the way control strings are sent from PC tables. PB is an embedded command and has the following format: PB # # is the line number in the PC table that corresponds to the control string you wish to send. Since it affects both portrait and landscape page orientation, you must enter the PB command before any text or Print Type (PT) commands at the beginning of a file. In a multi-page document, enter the PB command immediately before the Page Break (PG) command. Then enter a carriage return. The PB command overrides any previous PB command in the file. The PC table for LBP printer files is described below. PC # PC Code Definition One-tray printers: 1 [1%r Landscape printing 2 [%r Portrait printing 3 [30p[1q[1%r Manual feed/landscape 4 [30p[1q[%r Manual feed/Portrait 5 [32p[1q[1%r Legal/manual feed/landscape 6 [32p[1q[%r Legal/manual feed/portrait Two-tray printers: 1 [1%r Landscape printing 2 [%r Portrait printing 3 [30p[2q[1%r Lower tray/landscape 4 [30p[2q[%r Lower tray/portrait 5 [30p[3q[1%r Upper tray/landscape 6 [30p[3q[%r Upper tray/portrait 7 [30p[1q[1%r Manual feed/landscape 8 [30p[1q[%r Manual feed/portrait 9 [32p[1q[1%r Legal/manual feed/landscape 10 [32p[1q[%r Legal/manual feed/portrait Two-tray printers and optional envelope feeder: 1 [1%r Landscape printing 2 [%r Portrait printing 3 [30p[2q[1%r Lower tray/landscape 4 [30p[2q[%r Lower tray/portrait 5 [30p[3q[1%r Upper tray/landscape 6 [30p[3q[%r Upper tray/portrait 7 [30p[1q[1%r Manual feed/landscape 8 [30p[1q[%r Manual feed/portrait 9 [32p[1q[1%r Legal/manual feed/landscape 10 [32p[1q[%r Legal/manual feed/portrait 11 [30p[4q[1%r Optional envelope feeder CUSTOMIZING PRINTER FILES The LBP printer file package contains the following four files: File Supports 3CANINT.PRN Internal fonts (fixed and scalable) 3CANBM1.PRN Internal and font card BM-1 and BM-2 3CANBM3.PRN Internal and font card BM-3 3CANSC1.PRN Internal and font card SC-1 While Canon font cards are supported in the three files listed below 3CANINT.PRN, you can copy just the fonts that you need into 3CANINT.PRN by using the following steps: 1. Copy the font definition and width table from the appropriate printer file into your customized printer file. The following is an example of a font definition: FO:CENTURY8M FO<('$2[?0 K[80 C[23y)' 1 FO>(B[0 K[23m[22m VL=100 UW:CENTURY8M ET The following is an example of a width table: WD:CENTURY8M SW=180 0=100 . . ET 2. Create a new PT table to access the new fonts. (Refer to Application Note 162.) 3. Store and load the printer file. Make sure there are no error messages. Printer File Memory Limitations XyWrite uses a 64K memory buffer for printer files. In addition, XyWrite limits the number of mode entries in a printer file to 750. To keep the Canon printer files within the 64K memory limit and the 750 mode entry limit, we have made some adjustments, as follows: 1. Seven standard scalable font sizes have been set up in each file (8, 10, 12, 14, 18, 24, & 36 points). You will need to create and scale any additional point sizes (see ``Adding a scalable font''). 2. Of the 20 or more PT tables provided, all but five have been commented out. 3. All definitions (FO:) for internal scalable fonts that have not yet been enabled have been commented out. 4. All substitution tables (SU:) for internal scalable fonts that have not yet been enabled have also been commented out. Printer file information that is preceded by a semicolon is considered to be ``commented out.'' Such information is not loaded into memory when you load the printer file, but it is easily available for you to use if you follow the procedure described below. If you want to use one of the fonts or PT tables that has been commented out, in some cases you may need to comment out (or delete) something else in the printer file in order to make memory space available. For example, if you know you will never use the Courier17 font, you can comment out the PT table, font definitions and width table for Courier17. Then remove the semicolons from the tables that define the information you want to load into memory. This will make them available for you to use. If you want to have many PT tables active, you may reach the 750 mode limit before you expect to. This is because XyWrite automatically creates redlining modes--INSERT and DELETE equivalents--for each mode definition in the printer file. Thus, XyWrite actually triples the number of mode statements you add to your printer file. You can free up memory while retaining the redlining features for a limited number of PT tables by abbreviating the names of the INSERT and DELETE modes (e.g., to INS and DEL respectively). XyWrite does not automatically create redlining modes unless it finds, as attributes, the words INSERT and DELETE spelled out fully. To save memory in this way, follow the procedure outlined below: 1. Call the printer file to the screen. 2. Shorten the names of the INSERT and DELETE attribute tables to INS and DEL. 3. Add the INS and DEL mode statements to those PT tables for which you want to retain redlining modes, using the new attribute names you selected in step 2. For example: MD IN+PICA+INS MD DN+PICA+DEL MD IB+PICA+BOLD+INS MD DB+PICA+BOLD+DEL For more information, see the conversion table for redlining modes in Chapter 5 of the XyWrite III Plus Reference Guide. Note #1 Mode Statements. Be sure to add mode statements for all modes in the PT table which are to have redlining capability. By defining redlining for only specific modes and PT tables, you can increase the number of mode entries available to you. Of course, if you never use redlining at all, you can remove the INSERT and DELETE attribute tables from the printer file entirely, or comment them out with semicolons. LANDSCAPE PRINTING Landscape printing is useful when printing a spreadsheet document with many columns, or an envelope. The XyWrite default settings in the LBP printer files are set for portrait printing. To print effectively in landscape mode, you must override the Page Length (PL) and Form Depth (FD) default settings. To take advantage of the full width of the landscape orientation, you should also adjust your right margin. (When landscape printing, the right margin can be set at up to 100.) You can change to a landscape orientation by using the PB code for landscape (PB 1) at that point in your file at which you wish landscape printing to begin. To resume portrait orientation, enter PBÿ202. 1. Call your document to the screen. For example: Type: F5call chapter.doc 2. Enter the formatting commands to set the top margin, form depth, page length, and right margin for the landscape page orientation. Don't forget to include a PB code for landscape printing. Type: F5pb 1 Type: F5tp 1 Type: F5fd 47 Type: F5pl 44,46,42 Type: F5rm 100 3. Enter the rest of the formatting commands. Result: Your document is now ready for landscape printing. PRINTING ENVELOPES Envelope printing is a form of landscape printing. As described in the previous section, you need to override some default settings (such as TP, PT, FD, PL, LM, RM, etc.) and include a PB command. The settings you use depend on whether you manually feed envelopes or use the optional envelope feeder: Manual Feed Envelopes To print an envelope by manually feeding the envelope: 1. Create a new file. For example: Type: F5new envelope 2. Type in the PB 3 command for Manual feed/landscape. Type: F5pb 3 Result: When you enter the TYPE command, the PB command causes the LBP printer to prompt you to feed from the manual feed slot. 3. Input the following embedded formatting commands, then type a carriage return. Type: F5tp 24 (for Mark III) Type: F5tp 10 (for LBP-4) Type: F5fd 47 Type: F5pl 42,44,40 Type: F5lm 52 Type: F5rm 120 4. Enter the name and address you wish to type on the envelope. 5. On the Mark III, insert the envelope, face up and stamp end first, into the printer. On the LBP-4, insert the envelope face down, stamp end first. 6. Type: F5type Automatic Envelope Feeder To print an envelope using the optional envelope feeder: 1. Create a new file. For example: Type: F5new envelope 2. Type in the PB 11 command for the envelope feeder. Type: F5pb 11 3. Input embedded formatting commands, then type a carriage return. For example, you might use the following commands if you were going to print on a standard #10 envelope from the automatic feeder: Type: F5tp 10 Type: F5lm 35 Type: F5pt 5 4. Enter the name and address you want on the envelope. 5. Type: F5type ADDING A SCALABLE FONT The current printer files come with a variety of font sizes. (See "Printer File Memory Limitations" section above.) The 3CANSC1.PRN file supports both internal scalable fonts and font card SC1. The latter includes Avant Garde, Bookman, Zapf Chancery, Zapf Dingbats, Century Schoolbook, Swiss Narrow and Zapf Calligraphic fonts. Scalable fonts can be created in all sizes. For example, you may want to print a document in 10-point type with 16-point headlines. To do this, copy the existing 12-point font definition to create a font definition for each new font that you wish to use. Then either create a new Print Type (PT) table, or modify the mode statements in an existing PT table. 1. Copy the following eight lines: A FO:12DUTCH B FO<[?32h(ÿ20ÿ20ÿ20[?0ÿ20K[120ÿ20C[5y FO>[?32l(B[0ÿ20K[23m[22m FO=15 C VL=140 D UW:12*DUTCH ET ; The A, B, C, and D to the left of the eight lines are included only to clarify this description. They do not appear in the printer file. 2. If necessary, change A, B, and D to reflect the point size you are using. Value B represents a decimal value (12.0 in the example). Only whole point sizes can be used with XyWrite. 3. Use the following formula to calculate Value C (Vertical Leading): VL = (point size + modifier) * vertical movement ö 72 Vertical movement is the unit of vertical measurement used throughout the printer file to calculate movement. In all Mark III printer files, that value is 720. Modifiers are added to the point size, to give more room between lines of type. Standard modifiers are: Point size Modifier 1 - 8 1 9 - 14 2 15 & larger 3 The value of C in the example was calculated as follows: (12+2) * 720 ö 72 = 140 4. Repeat this procedure for every new point size. Each size or typestyle in a family requires a separate font table. For example, to use a 10-point Dutch Bold and 10-point Dutch Italic, you need to create a font table for each. Note #2 Font Naming Conventions. XyWrite requires adherence to precise font naming conventions. Therefore, when copying an existing font table to create a new one, always refer to the list of font names at the top of the file to make certain you are using the exact name XYQUEST has assigned. 5. Create a new substitution table for each new font size. The following example shows the existing substitution tables for 12Dutch: SU: 12DUTCH =[31a ET SU: 12DUTCH-ITALIC =[29a ET SU: 12DUTCH-BOLD =[33a ET SU: 12DUTCH-BOLDITALIC =[31a ET For each weight (reg., bold, italic, bolditalic), change the value between the "[" and the "a." To determine the correct values, use the following formula: v2 = (v1 * n)/12 where v2 = value to be determined for new font size v1 = value of the corresponding 12 point font n = new point size For example, to determine the new values for 11 point Dutch, using 12Dutch as a reference: v2 = (31 * 11)/12 = 28.41 (round off to nearest integer, 28) RESULTING SUBSTITUTION TABLE: SU:11DUTCH =[28a ET Repeat for each weight (bold, italic, bolditalic). 6. Once you have created the required font tables and substitution tables, create a Print Type (PT) table that references them. (Refer to Application Note #162.) SPECIAL FEATURES OF THE LBP PRINTERS Some special features of the LBP Printers that are supported by XyWrite are: character outlining, shading, shadow, inverse (black type on shaded background), and reverse (white type on black background). You can use these features individually or in combination. An example of each appears in the box at the bottom of this page. These features are set up in the XyWrite printer file as attributes. To use the features, you must add the attributes to the Print Type (PT) table of the desired font. For example, to get 10-pt Dutch with shadow and outline print, you could assign those attributes to MD BR: MD NM+10DUTCH MD BO+10DUTCH-BOLD MD UL+10DUTCH+UNDERLINE MD RV+COURIER10+FORMS MD BU+10DUTCH-BOLD+UNDERLINE MD BR+10DUTCH+SHADOW+OUTLINE MD SU+10DUTCH+SUPERSCRIPT MD SD+10DUTCH+SUBSCRIPT Attributes can be added in any combination because their order does not matter. Be sure to store and load the printer file so that your changes will be in effect. You can modify the SHADING attribute to access any one of 69 possible patterns. To access a different pattern: 1. Call your printer file. For example: Type: F5call 3CANINT.PRN 2. Search for AT:SHADING. Type: F5se /at:shading/ XyWrite displays the following: AT:SHADING AT<[2;;;;;;%}[?5m AT>[9;;;;;;%}[?25m ET Substitute the number of the pattern on the chart you wish to use where the numeral 2 appears on the second line. This is the only change you need to make in this attribute definition. Once you have made the change and added the SHADING attribute to a PT table, store and load the file. Note #3 Using Multiple Patterns. If you wish to use more than one pattern at a time, you must create an attribute definition for each pattern. Copy all four lines of the existing definition, including the ET line at the end. Then, to distinguish this pattern, change the name from SHADING to a name of your choice. In order to access this pattern, add the attribute name that you have chosen to the PT table for each font in which you wish to use this pattern. PRINTING CHARACTERS FROM NON-TEXT FONTS XyWrite can display only the characters in the ASCII character set, but the printer files are designed so that you can use XyWrite to print the Symbol and Zapf Dingbat character sets available on the printer. If you wish to use the characters in the Symbol or Zapf Dingbat font, you first have to modify your printer file. The LBP printer files already contain the font definitions and width tables for the fonts. All you need to do is assign the font name (12SYMBOL or 12DINGBAT) to any character mode other than Mode Normal (MD NM). For example, if you don't use XyWrite's forms feature, you could reassign reverse mode (MD RV) to the Symbol font. 1. Call the printer file to the screen. For example: Type: F5call 3CANINT.PRN 2. In expanded mode, move the cursor to the first MD RV statement. Type: F5se /md rv/ 3. Change the line to access the Symbol font as follows: MD RV+12SYMBOL 4. Move to the next MD RV statement, and repeat step 3, until you have modified all of your PT tables. 5. Store and load the printer file. To print one of the characters from the Symbol font, you need to know what character from the ASCII set will represent it on screen. For example, if you want to print a copyright symbol: 1. Refer to the list entitled ``Canon LBP Printers Symbol and Zapf Dingbat Font Characters'' (available on request) and locate the copyright symbol. You will see that the copyright symbol is listed as ASCII 211. 2. Move the cursor to where you want the copyright symbol to be. 3. Change to reverse mode: Press: Ctrl-4 4. Enter the symbol. Type: AltShift211 5. Return to the default mode: Press: Ctrl-0 6. Send your document to the printer. Result: The copyright symbol appears where you entered the ASCII 211 character.