APPLICATION NOTE #175 USING THE HP DESKJET PLUS WITH XYWRITE III PLUS Rev. 02 Related files: see list below. The DeskJet Plus, manufactured by Hewlett Packard, is an inkjet printer that supports cartridge and soft fonts. XYQUEST has developed printer files that enable you to use the DeskJet Plus printer with XyWrite III Plus, Version 3.55 or later. This application note describes the DeskJet Plus printer files, gives instructions for modifying them, and provides detailed instructions on how to print your documents in landscape orientation and on envelopes. PRINTER FILES There are four files included in the DeskJet Plus printer file package. These files support the internal fonts and all the new fonts created for the DeskJet Plus. 3DJ-PLS1.PRN--Supports all internal fonts, the HP 22708C soft font product, and the R, T, U, and V cartridge fonts in the PC-8 (10U) character set (which is the "full IBM character set," the DeskJet Plus default). 3DJ-PLS2.PRN--Supports all internal fonts, the HP 22708C soft font product, and the R, T, U, and V cartridge fonts in the Roman8 (8U) character set. 3DJ-PLS3.PRN--Supports all internal fonts and the HP 22708D soft font product in the PC-8 (10U) character set. 3DJ-PLS4.PRN--Supports all internal fonts and the HP 22708D soft font product in the Roman8 (8U) character set. Monospaced Font Names The DeskJet Plus's monospaced fonts have two fixed values: * Point Size (character height) * Pitch (characters per inch) XyWrite's font names for monospaced fonts have the form: pointsize/pitchFONTNAME For example, a font containing 12-point Courier type that prints 10 characters per inch is named: 12/10CO Form Depth The DeskJet Plus printer does not allow you to access the entire width and length of a sheet of paper. It "steals" 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 Plus printer files. PC Tables Each DeskJet Plus printer file contains a PC (Printer Control) table that allows you to access four different paper sizes and print certain fonts in either portrait or landscape orientation (see "Landscape Printing"). The PC table is described below. PC # PC Code Size Orient. 1 &l2A&l1O Letter (8-1/2 x 11) Portrait 2 &l2A&l0O Letter (8-1/2 x 11) Landscape 3 &l3A&l1O Legal (8-1/2 x 14) Portrait 4 &l3A&l0O Legal (8-1/2 x 14) Landscape 5 &l26A&l1O A4 (European) Portrait 6 &l26A&l0O A4 (European) Landscape 7 &l81A&l1O #10 Envelope Portrait Normally, you use the PC command to invoke PC codes at a particular point in your text file. However, the DeskJet Plus processes PC codes in a way that conflicts with the TP and RH commands. Therefore, XYQUEST has developed the PB (Page Begin) command to change the way control strings are sent from PC tables. PB is an embedded command and has the format: pb # where # is the line number in the PC table that corresponds to the control string you want to send. For example, to print on legal-sized paper: Type: F5_pb 3 The PB command must be entered before the page it is to affect, which means that in a multi-page document it immediately precedes the PG (Page Break) command. For more information on using the PB command, refer to the procedure for the specific task you want to perform. Note #1 Lowercase L. In all escape codes shown in this application note, the character after the ampersand is a lowercase L. MODIFYING DESKJET PLUS PRINTER FILES The printer files delivered with the DeskJet Plus package are all set to go. Each file contains PT tables for the most commonly use fonts. All you need to do is select the one you want and load it into memory with the LOAD command. Keep in mind, however, that the DeskJet Plus offers several options. You may want to modify the standard printer files to incorporate one or more of these options. The following sections give you the information you need add a PT table and to change the underline type, print quality, and character set. Remember to store and load the printer file every time you make a change. For more information on modifying printer files, refer to Chapter 6 of the XyWrite III Plus Reference Guide. 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. Each DeskJet Plus printer file contains a set of PT tables, but you may want to add another one for a font that hasn't been defined. For example, you may want to add a draft quality version of the 12-point/10 pitch Courier font. 1. Page down in the printer file until you see the PT table that most closely resembles the one you want to create. For example, if you want to create a draft version of 12-point Courier, locate the PT table that defines the letter-quality version of 12-point/10 pitch Courier. 2. Define the PT table you selected in step 1. 3. Move the cursor to the end of the PT section of the printer file, and copy the defined block. 4. Press F3 to restore the defined text. 5. In the new table, change the number after PT= to the next available number. For example, change PT=1 to PT=12. 6. Make the appropriate changes to the MD statements in the table. This step might involve changing point sizes, font names, or attribute names. Follow the exact naming conventions used in the DeskJet Plus printer files. 7. Store and load the printer file. For more information on creating PT tables, refer to Application Note #162. Changing Underline Type The DeskJet Plus printer supports five types of underlining, which are listed below with their attribute names: * Regular (UNDERLINE) * Double (D-UNDERLINE) * Single floating (SF-UNDERLINE) * Double floating (DF-UNDERLINE) * Landscape (L-UNDERLINE) The position of single and double floating underlines is based on the font family (for example, Courier, Helvetica, Prestige, etc.), not on different point or pitch sizes within the same font family. While they work with any point size, they are best suited for large type sizes. Fixed underlines (regular and double) are always in the same location, no matter what font is being used. The landscape underline is required for landscape fonts. (See "Landscape Printing.") The standard DeskJet printer files use regular underline as the default value. You can define a different underline type by modifying the appropriate MD (Mode) statement in the printer file's PT tables. For example, to change from regular underlining to double underlining for 12-point/10 pitch Courier: 1. Call the printer file to the screen. 2. Move the cursor to PT=1, which defines the mode statements for 12/10CO. 3. Change the attribute name in the MD UL line from UNDERLINE to D-UNDERLINE. The finished line should look like this: MD UL+12/10CO+D-UNDERLINE+LQ 4. Store and load the printer file. Result: When you TYPE your document, 12-point Courier text in underline mode prints with a double underline. You can also define regular and double underline in the same PT table by using two MD statements. For example, use MD UL for regular underline and MD BR for double underline. In this case, the modified PT table would look like this: PT=1 MD NM+12/10CO+LQ MD BO+12/10CO-BOLD+LQ MD UL+12/10CO+UNDERLINE+LQ MD RV+12/10CO+FORMS MD BU+12/10CO-BOLD+UNDERLINE+LQ MD BR+12/10CO+D-UNDERLINE+LQ MD SU+12/10CO+SUPERSCRIPT+LQ MD SD+12/10CO+SUBSCRIPT+LQ When you TYPE your document, 12-point Courier text in underline mode has a single underline, while 12-point Courier text in bold reverse has a double underline. Changing Print Quality The DeskJet Plus printer offers two print qualities, draft quality at 240 cps (characters per second), and letter quality (default setting) at 120 cps. The standard printer files are set up for letter quality. To access draft quality printing: 1. Call the printer file to the screen. Type: F5ca 3dj-pls1.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 repeat the steps to change 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. Using the Legal Symbol Set The DeskJet Plus printer has a symbol set of legal characters that can be accessed by: all the internal fonts; all cartridge fonts except M, P, and Q; and all 8A (HP 22708A), 8C (HP 22708C), and 8D (HP 22708D) soft fonts, except the ASCII character set portion of the soft font products. The printer file 3DJ-PLS1.PRN includes a substitution table (SU:LEGAL) for the following characters: ASCII Value Produces: 7 trademark symbol 15 registered symbol 17 copyright symbol 27 dagger To access the legal characters: 1. Call the printer file to the screen. 2. Remove the semicolon from the line US:LEGAL in the font table you are using and place a semicolon in front of the line US;PCSYMBOL. For example, to access legal characters with the 12-point/10 pitch Courier font, the font table should changed from: FO:12/10CO FO<{esc}(10U{esc}(s0p10h12v0s0b3T VL=58 UW:2*20pitch ;US:LEGAL ET to: FO:12/10CO FO<{esc}(10U{esc}(s0p10h12v0s0b3T VL=58 UW:2*20pitch US:LEGAL ET 3. Store and load the printer file. 4. Call your document to the screen. 5. Move the cursor to the place where you want one of the legal symbols to appear and enter its ASCII value (from the table above). For example, to print a copyright symbol: Type: Alt Shift 17 Result: A left-pointing arrow head appears on the screen, but the copyright symbol appears on the printed page. LANDSCAPE PRINTING 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 DeskJet Plus printer allows you to print your documents in either a portrait or a landscape font, or to mix them on different pages within a document. (The DeskJet Plus does not allow you to mix portrait and landscape fonts on the same page, however.) Landscape Fonts Landscape printing is a built-in feature of the DeskJet Plus. There are several different sizes of the internal Courier font that will print in landscape. For a list of these fonts, display the DeskJet Plus printer file and scroll to the table "Standard Internal Fonts." Unless you plan to print underlined text, you can use the same PT tables for portrait and landscape orientation. If you do plan to underline, you need to create a new PT table and change the underline attribute. (See "Modifying DeskJet Plus Printer Files.) PC Codes The default printing mode is portrait on letter-sized paper. To change to landscape, you need to send a control string to the DeskJet Plus. The control string also specifies whether you are printing on letter-sized, legal-sized, or European-sized paper. To simplify the process of getting this information to the printer, XYQUEST put the required control strings in a PC table in the printer file (see Page 1). You send the appropriate PC code to the printer with the PB (Page Begin) command. You must enter PB commands before any text or PT (Print Type) commands. Note #2 Default Setting. Because portrait printing is the default setting, you don't need to send the code for portrait orientation unless you are returning to portrait from landscape. Formatting Commands When you change printing orientation, you change the "shape" of your text area. (For example, the form length is no longer 11 inches, but is 8-1/2 inches.) You therefore need to adjust the values in the embedded formatting commands in your document. (Remember, the DeskJet Plus "steals" a border area, so the maximum printing area for letter-sized paper is 10 inches by 7.5 inches.) For landscape printing on letter-sized paper, some typical values are: RM 100 FD 45 PL 42,44,40 Printing a Document in Landscape Orientation To activate landscape printing for an entire document: 1. Call the document to the screen. 2. Enter the appropriate PB command at the beginning of the file. For example: Type: F5pb_2 3. Enter the other formatting commands you want to apply to the document. For example: Type: F5pt_12 Type: F5rm_100 Type: F5fd_45 Type: F5pl_42,44,40 Result: When you print the document, the font specified by PT12 is printed in a landscape orientation on standard-sized paper. To print the document in landscape orientation on legal-sized paper, the procedure is as follows: 1. Load legal-sized paper in the printer according to the instructions in the DeskJet Plus documentation. 2. Call the document to the screen. 3. With the cursor at the beginning of the file, enter the appropriate PB command. Type: F5pb_4 4. Enter the rest of the formatting commands. For example: Type: F5pt_12 Type: F5rm_112 Type: F5fd_45 Type: F5pl_42,44,40 Result: When you print the document, the font specified by PT12 is printed in a landscape orientation on legal-sized paper. Mixing Portrait and Landscape Printing If you are switching from portrait to landscape in the same document, the most important thing to remember is that you must enter the PB command before the page it is to affect. For example, suppose you have a 3-page document and want pages 1 and 3 in portrait orientation, and page 2 in landscape: 1. Move the cursor to the end of page 1. 2. Enter the appropriate PB command for landscape printing. For example, for letter-sized paper: Type: F5pb_2 3. Enter a PG (Page Break) command and a carriage return. Type: F5pg Press: 4. Enter the PT command for your landscape font, along with the appropriate margin and page length settings. 5. Move the cursor to the end of page 2, enter the PB command that will set the printer back to portrait orientation. 6. Repeat step 3. 7. Enter the PT command for the portrait font, along with the appropriate margin and page length settings. PRINTING ON ENVELOPES The following sections describe the procedures for printing a single envelope and printing a series of envelopes using XyWrite's Mail Merge feature. Printing a Single Envelope Use the following procedure to print a single envelope. 1. Create a new file Type: F5new envelope 2. Enter the following embedded commands in the order shown. Type: F5pb_7 Type: F5fd_24 Type: F5pl_22,23,21 Type: F5lm_35 Type: F5rm_80 Type: F5tp_7 3. Type a carriage return to end the line of embedded commands. 4. Enter the name and address you want typed on the envelope. 5. 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. 6. Print the address. Type: F5type 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 each record. 2. Create the main file by following steps 1 and 2 under "Printing a Single Envelope." 3. Type the appropriate FI and PF statements. (Refer to Chapter 5 of the XyWrite III Plus Reference Guide for information.) When in expanded mode, your completed main file should look something like this: <><><><> <><> <> <> <> <>, <> <> You can use this file as a standard envelope format file (main file) with different mailing lists (data files). 4. Store the file and then send it to the printer (you must use the TY ,,p form of the Type command). Type: F5store Type: F5ty data+main,,p Note #3 Epson Emulation. There is an Epson emulation cartridge designed for the DeskJet Plus printer--HP22707F. (You cannot use the HP22707E Epson Emulation cartridge originally designed for the DeskJet printer.) To use the HP22707F cartridge, you should load the printer file 3EPSONFX.PRN instead of 3DJ-PLS1.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 Plus does not allow you to use the full 11 inches on the page. ###