APPLICATION NOTE #144 USING THE HP DESKJET WITH XYWRITE III PLUS Rev. 07 This application note contains some tips for using a Hewlett-Packard DeskJet printer with XyWrite III Plus and covers the following topics: * Font names * Form depth * Print direction * Paper sizes * Printing on legal size paper * Printing on A4 (European) paper * Printing on envelopes * Legal symbol set * Print quality * Underlining * PT (Print Type) tables DESKJET The DeskJet printer, manufactured by Hewlett-Packard, is an inkjet printer with two slots for loading cartridge fonts. It also accepts two 128K HP RAM cartridges (for 256K RAM maximum), which support soft fonts. FIXED WIDTH FONT NAMES The DeskJet's fixed width fonts have two fixed values: * Point Size (character height) * Pitch (characters per inch) XyWrite's font names for fixed width fonts have the form: pointsize/pitchFONTNAME For example, a font containing 12-point Courier type that prints 10 characters per inch is named 12/10COURIER FORM DEPTH The DeskJet printers do not allow you to access the entire width and length of a sheet of paper. They "steal" about 1/2 inch from both the top and bottom margins and about 1/4 inch from the left and right margins. This means you have to adjust the LM (Left Margin) and FD (Form Depth) commands embedded in your document accordingly. 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 60 lines on a standard 8-1/2 x 11 sheet of paper. Therefore, we have set FD (Form Depth) to 60 in the DeskJet printer file (3DESKJET.PRN). PRINT DIRECTION In standard printing (also called portrait 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. The HP DeskJet printer allows you to print your documents in either a portrait or a landscape font, but does not allow you to mix portrait and landscape fonts on the same page. (see Note #1.) To print in landscape, you use the 22707K and the 22707L Hewlett Packard DeskJet landscape cartridges (see Note #2) and XyWrite's landscape printer file (3DJ-LAND.PRN). To activate landscape printing: 1. Turn off your DeskJet printer, place one or both (either 22707K or 22707K and 22707L) of the landscape cartridges in the appropriate slot(s), and turn on the printer to initialize the cartridge(s). 2. Call the printer file to the screen: Type: F5°ca 3dj-land.prn° 3. Create a PT table for the landscape fonts you want to use. (Refer to "Creating a New PT Table".) Enter the correct font name (Landscape font names correspond to portrait font names except they start with an L-. For example, L-10TIMES is the landscape version of 10 TIMES. 4. Store and load the printer file. Note #1 Mixing Portrait and Landscape Fonts Within a Document. Although you cannot mix portrait and landscape printing on the same page, you can mix them on different pages of the same document. If you plan to do this, use the PG (Page Break) command on a line by itself to change from landscape to portrait or vice versa. Note #2 Using the 22707L HP Landscape Cartridge. To use the fonts in the 22707L landscape cartridge, you must insert the 22707K and the 22707L in the appropriate slots. Note #3 Automatic Underlining. The Automatic Underlining used by portrait fonts is not supported by the Landscape cartridges. You must use the attribute L-UNDERLINE to access underline with a landscape font. PT=1 in 3DJ-LAND.PRN provides an example. The XyWrite defaults in 3DJ-LAND.PRN are based on landscape printing. To use portrait printing effectively with this file, you must override the PL (Page Length), FD (Form Depth), and RM (Right Margin) default settings as follows: XyWrite 3DJ-LAND.PRN Defaults Defaults FD 60 FD 45 PL 54, 56, 52 PL 42, 44, 40 RM 78 RM 100 PAPER SIZE The DeskJet prints on four different paper sizes: 1. U.S. Letter, 8-1/2" x 11" 2. U.S. Legal, 8-1/2" x 14" 3. A4 (European), 210mm x 240mm 4. #10 Envelopes, 4-1/8" x 9-1/2" The default is U.S. Letter. The PC (Printer Control) table of the printer file contains the coding necessary to access these different paper sizes. The PC table in 3DESKJET.PRN has four lines of coding, accessed by PC commands, that tell the printer to type on the following paper sizes. Command: Paper Size: PC 1 U.S. Letter PC 2 U.S. Legal PC 3 A4 (European) PC 4 #10 Envelopes Since the DeskJet's default setting is U.S. Letter, the only time you need to use the command PC 1 is when you want to change to one of the other paper sizes and then back to U.S. Letter in the same document. To print on these different paper sizes, follow the procedures provided in the following three sections. PRINTING ON LEGAL SIZE PAPER Use the following procedure to print on 8-1/2" x 14" paper: 1. Load legal size paper by pulling out the paper tray extender located on the center front of the IN tray. Remove all paper, and place legal size paper in the tray. Slide the paper width adjustment lever (located below the left corner of the IN tray) to the right until the paper is flush against the right side of the tray. Slide the paper tray extender forward until it is snug against the paper. 2. Create a new file with the following embedded Top Margin, Printer Control, Form Depth, and Page Length commands. When in expanded mode, your commands should look like this: <><><><> 3. Enter any other appropriate formatting commands (such as LM, RM, etc.). See Note #4. Note #4 Top Margins for Legal Size or A4 (European) Paper. If you want to use a top margin when printing on legal size or A4 (European) paper, add to the end of your row of embedded commands an EL (Extra Leading) command with a value of one less than the Top Margin, followed by a carriage return. On the next line, add a TP (Top Margin) command. For example, to get a top margin of 6 lines (1 inch), add this sequence to your row of embedded commands: Type: F5_el 5 Press: Type: F5_tp 6 Result: XyWrite inserts a top margin of 6 lines. The EL command and the carriage return set the top margin for the first page, while the TP command sets the top margin for all the following pages. This sequence of commands must be used when you want a top margin on legal or A4 size paper. PRINTING ON A4 (EUROPEAN) PAPER Use the following procedure to print on 210mm x 240mm paper: 1. Load A4 size paper by pulling out the paper tray extender located on the center front of the IN tray. Remove all paper, and place A4 size paper in the tray. Slide the paper width adjustment lever (located below the left corner of the IN tray) to the right until the paper is flush against the right side of the tray. Slide the paper tray extender forward until it is snug against the paper. 2. Create a new file with the following embedded Top Margin, Printer Control, Form Depth, and Page Length commands. When in expanded mode, your commands should look like this: <><><><> 3. Enter any other appropriate formatting commands (such as LM, RM, etc.). See Note #4 above. PRINTING ON ENVELOPES Use the following procedure to print a single envelope or use the Mail Merge procedure to print a series of envelopes: 1. Create a new file Type: F5_new envelope_ 2. Create a new file with Top Margin, Printer Control, Form Depth, Page Length, Left Margin, Right Margin, and Extra Leading commands embedded in the following order. End the line of commands with a carriage return. When in expanded mode, your commands should look like this: <><><><><> <><> 3. Enter the name and address you want typed on the envelope. 4. Insert a #10 envelope head first, flap facing up, into the envelope guides on the OUT tray. With the right side of the envelope flush against the right side of the tray, push the envelope under the paper feed rollers until it stops. 5. Type: F5_type Using Mail Merge to Print Envelopes You can use XyWrite's Mail Merge capability to print a series of #10 envelopes as follows. 1. Create the data file and enter the names and addresses on your mailing list. Be sure to leave a blank line between records. 2. Create the main file by following steps 1 & 2 under Printing on Envelopes. 3. On the second line, add a second TP (Top Margin) command after the EL (Extra Leading) command. You must use a value of one greater than the EL command. Type: F5_tp 8 This ensures that XyWrite will insert a top margin, starting with the second envelope, that will match the first envelope. 4. Type the appropriate FI and PF statements. When in expanded mode, your completed main file should look like this: <><><><><> <><> <><> <> <> <>, <> <> You can now use this file as a standard envelope format file (main file) with different mailing lists (data files). 5. Store the file and then send it to the printer (you must use the TY ,,p form of the Type command). Type: F5_st Type: F5_ty data+main,,p LEGAL SYMBOL SET The DeskJet printer has a symbol set of legal characters that can be accessed by: all the internal fonts; all cartridge fonts except M (HP 22706M), P (HP 22706P), and Q (HP 22706Q); and all 8A (HP 22708A) soft fonts, except the ASCII character set portion of the soft font product. The printer file 3DESKJET.PRN includes a substitution table (SU:LEGAL) for the following characters: ASCII Character Screen Display: Produces: (007) trademark (015) registered mark (017) copyright symbol (027) dagger Tip: to display these characters on the screen, hold down the ALT and SHIFT keys simultaneously, and type in the ASCII number (listed in parenthesis above). To access the legal characters: 1. Call the printer file to the screen. 2. Add the line US:LEGAL to the font definition you are using just before the ET (End Table) statement. For example, to access legal characters with the 12/10COURIER font, the definition should be: ; FO:12/10COURIER FO<{esc}(10U(s0p10h12v0s0b3t2Q VL=58 UW:2*20pitch US:LEGAL ET ; PRINT QUALITY The DeskJet printer offers two print qualities, draft quality at 240 cps (characters per second), and letter quality (default setting) at 120 cps. To access draft quality printing: 1. Call the printer file to the screen. Type: F5ca 3deskjet.prn 2. Search for the PT (Print Type) table that is set up to access the desired font. For example: Type: F5se /PT=1/ 3. Change each occurrence of LQ (Letter Quality) in PT=1 to DRAFT. For example: Type: F5cv /LQ/DRAFT/ (See Chapter 3 of the XyWrite III Plus Reference Guide for more information on the Change command.) 4. Store and load the printer file. To change back to letter quality, simply change the DRAFT back to LQ. To access both DRAFT and LQ with the same font, define and copy the existing PT table, give the new PT table a unique number, and change each occurrence of LQ to draft. (Refer to "Creating a New PT Table".) This lets you access DRAFT and LQ for the same font by using separate PT commands rather than having to call and change the printer file each time you want to change print quality. UNDERLINING The DeskJet printer supports four types of underlining, which are listed below with their attribute names: * Regular (default) (UNDERLINE) * Double (D-UNDERLINE) * Single floating (SF-UNDERLINE) * Double floating (DF-UNDERLINE) Single and double floating underlines are positioned based on the font family (for example, Courier, Helvetica, Prestige, etc.) Ä not on different point or pitch sizes within the same font family. Fixed underlines (regular and double) are always in the same location independent of the font being used. The following example shows how to change from regular underlining to double underlining for the font 12/10COURIER: 1. Call the printer file to the screen. 2. Change the MD UL line in the appropriate PT (Print Type) table From: PT=1 MD NM+12/10COURIER MD BO+12/10COURIER-BOLD MD UL+12/10COURIER+UNDERLINE MD RV+12/10COURIER+FORMS MD BU+12/10COURIER-BOLD+UNDERLINE MD BR+12/10COURIER MD SU+12/10COURIER+SUPERSCRIPT MD SD+12/10COURIER+SUBSCRIPT To: PT=1 MD NM+12/10COURIER MD BO+12/10COURIER-BOLD MD UL+12/10COURIER+D-UNDERLINE MD RV+12/10COURIER+FORMS MD BU+12/10COURIER-BOLD+UNDERLINE MD BR+12/10COURIER MD SU+12/10COURIER+SUPERSCRIPT MD SD+12/10COURIER+SUBSCRIPT 3. Store and load the printer file. Result: When using PT 1, mode underline Ctrl_3 produces double underlining on your print out. You might want to access regular and double underline in the same PT table. If so, modify the PT table. For example, leave the MD UL line as it is, and add D-UNDERLINE to the MD BR line as follows. PT=1 MD NM+12/10COURIER MD BO+12/10COURIER-BOLD MD UL+12/10COURIER+UNDERLINE MD RV+12/10COURIER+FORMS MD BU+12/10COURIER-BOLD+UNDERLINE MD BR+12/10COURIER+D-UNDERLINE MD SU+12/10COURIER+SUPERSCRIPT MD SD+12/10COURIER+SUBSCRIPT In this case, mode bold-reverse (Ctrl 6) would print out double underline. USING 4-POINT AND 5-POINT FONTS The 3DESKJET.PRN printer file is a relatively large file. To save memory when the file is loaded, a small portion of the width tables section has been "commented out" (a semicolon has been placed as the first character on certain lines in the file). Specifically, the width tables for the 4- & 5-point Helvetica fonts, and the 4- & 5-point Times Roman fonts have been commented out. A list of these font names follows: 4TR (4-point Times Roman) 4TR-BOLD (4-point Times Roman-Bold) 4TR-I (4-point Times Roman-Italic) 4TR-I-BOLD (4-point Times Roman-Italic-Bold) 5TR (5-point Times Roman) 5TR-BOLD (5-point Times Roman-Bold) 5TR-I (5-point Times Roman-Italic) 5TR-I-BOLD (5-point Times Roman-Italic-Bold) 4HV (4-point Helvetica) 4HV-BOLD (4-point Helvetica-Bold) 4HV-I (4-point Helvetica-Italic) 4HV-I-BOLD (4-point Helvetica-Italic-Bold) 5HV (5-point Helvetica) 5HV-BOLD (5-point Helvetica-Bold) 5HV-I (5-point Helvetica-Italic) 5HV-I-BOLD (5-point Helvetica-Italic-Bold) In addition, the UW: (Use Width) line in the font definition for each of the above fonts has been "commented out." If you want to use one of the fonts listed above, follow these steps: 1. Remove the semicolon from the UW: line of the desired font definition. 2. Remove the semicolons from the width table of the same font. As an example, let's say we want to be able to use the 5-point Times Roman-Italic font. 1. Call the DeskJet printer file to the screen. 2. Search for the appropriate font definition. Type: F5se /fo:5tr-i/ 3. Remove the semicolon from in front of the line: UW:5TR-I 4. Search for the width table of the same font. Type: F5se /wd:5tr-i/ 5. Remove the semicolons from the WD:5TR-I line (the 1st line of this width table) down to the ET (End Table) line. 6. Create a new PT table to access the new font (see "Creating a New PT Table"). CREATING A NEW PT TABLE PT (Print Type) tables enable XyWrite to actually use the fonts that are written into the file. The PT table numbers correspond to the value you use with the PT formatting command. For example, when you issue the command: F5pt 2 XyWrite looks at the table labeled PT=2 in the current printer file. You must add each font you want to use to a PT (Print Type) table. The easiest way to begin is to define an existing PT table and copy it to the end of the PT section. 1. Page down in the printer file until you see the PT tables. 2. Define the last PT table. For example, if PT=6 is the last table in the section: Move your cursor to the beginning of the PT=6 line and press F1_. Move your cursor to the end of the PT table (markedÿ20by a semicolon and a carriage return), then press F1_ again. Result: This defines the table PT=6 as a block. 3. Press: F7_(to copy the block) 4. Press: F3_(to release the defined block) 5. In the new table change the 6 in PT=6 to the next available number (e.g., PT=7). 6. Change the font name in the new table. Follow the exact naming conventions used in the 3DESKJET.PRN file. If you are actually adding three fonts (normal, bold, and italic), make sure to add the -BOLD extension to one name and the -I (Italic) extension to another. It is not necessary to change either the modes (MD NM, etc.) or the attributes (+ underline, etc.) in the PT table. An example of a completed PT table for 10-point Helvetica is shown below. PT=6 MD NM+10HV MD BO+10HV-BOLD MD UL+10HV+UNDERLINE MD RV+10HV+FORMS MD BU+10HV-BOLD+UNDERLINE MD BR+10HV-I MD SU+10HV+SUPERSCRIPT MD SD+10HV+SUBSCRIPT ; If you want a blank line between PT tables, make sure you put a semicolon on a blank line at the end of the table as shown above. 7. Store and load the printer file. Type: F5st Type: F5load 3deskjet.prn Note #5 XyWrite III Users. Because the printer file 3DESKJET.PRN is too large to load into memory in XyWrite III, we have created four separate DeskJet printer files as follows: 3DJ-FIX.PRN Ä All internal fonts and the fixed-width cartridge fonts (cartridges A, B, C, and M). 3DJ-HELV.PRN Ä All internal fonts, the Helvetica cartridges (G, H, J, and Q), and the Helvetica portion of the DeskJet Softfont product. 3DJ-TMSR.PRN Ä All internal fonts, the Times Roman cartridges (D, E, F, and P), and the Times Roman portion of the HP DeskJet Softfont product. 3DJET.PRN Ä All internal fonts. If you are using XyWrite III, Version 3.1, you must load one of these fonts instead of 3DESKJET.PRN. Note #6 Epson Emulation. There is an Epson emula~tion cartridge for the DeskJet printer. If you are using this cartridge, you should load the printer file 3EPSONFX.PRN instead of 3DESKJET.PRN. The file is located on the XyWrite Printer File disk that was part of your original package. Before loading it, however, call 3EPSONFX.PRN and add the following line immediately after the comments section: DF FD=60 This command changes the default form depth to 60 to accommodate the fact that the DeskJet does not allow you to use the full 11 inches on the page. Tip If you are a XyWrite III Plus user, you can save memory by using one of the XyWrite III printer files listed in Note #5.