APPLICATION NOTE #114 USING THE HP LASERJET SERIES II WITH XYWRITE Rev. 09 RELATED FILES: ENVELOP.DOC, ENV.PGM, and printer files This application note contains some tips for using a Hewlett-Packard LaserJet Series II with XyWrite III Plus. It addresses those questions most frequently asked of XYQUEST's Technical Support department regarding the LaserJet. LASERJET SERIES II The LaserJet Series II, manufactured by Hewlett-Packard, is a laser printer with 512K of memory and two slots for loading cartridge fonts. It has approximately 364K available for downloading soft fonts. The control panel on the LaserJet Series II provides a printing menu that allows you to set values for five printing options. To use the XyWrite LaserJet printer files described in this application note, be sure each of these options is set to its default value, as follows: No. of copies 01 Manual feed OFF Font Source I Font Number 00 Form Length 060 Four XyWrite printer files, described in the chart below, support the Math8, Math7, and PI fonts for both the DA/EA soft fonts (3HPSOFT1.PRN) and the J cartridge (3HP-CART.PRN). The 3HP-CART.PRN file also fully supports the Z cartridge. Latest Printer File Revision Supports 3HP-CART.PRN 3.2C All internal fonts plus all font cartridges 3HP-SOFT.PRN 3.2D All internal fonts plus AC/AD/AE/AF soft fonts 3HPSOFT1.PRN 3.2C All internal fonts plus DA/EA/RA soft fonts 3HPSOFT2.PRN 3.2C All internal fonts plus SA/TA/UA soft fonts The four printer files also contain Printer Control commands that allow you use some of the LaserJet II's options (e.g., envelope tray, manual feed, legal size paper). The Printer Control commands are summarized below, and are explained in more detail in the appropriate sections of this application note (see Notes #2 and #3). PC1 Standard 8-1/2 x 11 PC2 Standard 8-1/2 x 11 (manual feed) PC3 Standard 8-1/2 x 11 (manual feed-envelopes) PC4 Legal size 8-1/2 x 14 (manually fed from 8-1/2 x 11 tray) PC5-PC8 HP Series II envelope tray FORM DEPTH LaserJet Series II 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 that you have to adjust the LM (Left Margin) and FD (Form Depth) accordingly. For example, to get a 1-inch left margin, you issue the command LM 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. We have therefore set FD (Form Depth) to 60 in the LaserJet printer files. 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. Landscape printing is convenient if you want to print a spreadsheet, a document with many snaked columns, or an envelope. The LaserJet Series II 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 activate landscape printing, you must first modify your printer file. To do this: 1. Call your printer file to the screen. For example: Type: F5call 3hp-soft.prn 2. Create a PT table for the landscape fonts you want to use. Define and copy an existing PT table. Assign a new number to it (e.g., PT=5). 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 10TIMES.) 3. Store and load the printer file. XyWrite's defaults are based on portrait printing. To use landscape printing effectively, you must override the PL (Page Length) and FD (Form Depth) 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 up to 110.) Finally, if the default PT references a portrait font, use the EL (Extra Lead) command rather than the TP (Top Margin) command to insert blank lines on the first page of your document. You can use the TP command to set the top margin for subsequent pages. 1. Call your document to the screen. Type: F5call chapter.doc 2. Enter the formatting commands to set the form depth, page length, and right margin for the landscape page orientation. Type: F5fd 45 Type: F5pl 42,44,40 Type: F5rm 100 3. Enter the rest of the formatting commands. Don't forget to include a PT (Print Type) command that references the landscape PT table you created. Result: Your document is now ready for landscape printing. Note #1 Mixing Portrait and Landscape Fonts in 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, insert a PG (Page Break) command on a line by itself before entering the formatting commands to change from portrait to landscape or vice versa. Tip If you plan to switch between landscape and portrait several times within a document, it's a good idea to use the SS (Save Style) command to create portrait and landscape style definitions. Then you can use the US (Use Style) command to invoke the appropriate definitions. Refer to the XyWrite III Plus Reference Guide for more information on the SS and US commands. PRINTING ON ENVELOPES Envelope printing is a form of landscape printing. As described in the previous section, you need a landscape font and you need to override some default settings (such as TP, PT, FD, PL, LM, RM, etc.) You also need to send a command string to the printer to set it up for envelope printing. The printer files contain a PC Table that defines the required printer commands for several different envelopes. Standard 8-1/2 x 11 Tray PC2 Manual feed (or &l2H) PC3 Manual feed envelopes (or &l3H) HP Series II Envelope Tray PC5 Standard #10 envelope (or &l81A) PC6 Monarch size envelope (or &l80A) PC7 DL size envelope (or &l90A) PC8 C5 size envelopes (or &l91A) (Escape codes are provided in parentheses next to the PC command, both in the list above and in the procedures that follow. If you are using an older version of the LaserJet printer files, use the Printer Insert command to include the escape codes in your document. See Notes #2 and #3.) Note #2 Lowercase L. In all the escape codes shown in this application note, the character after the ampersand is a lowercase L. Note #3 Using Escape Codes Instead of PC Commands. If you have an older version of the HP LaserJet Series II printer files, you can embed escape codes into your document instead of using the PC commands described in the procedures. To do this, use the PI (Printer Insert) command with the escape sequence that corresponds to the size of the envelope or to the paper tray you want to use. For example: Type: F5pi &l3H Result: When you TYPE the file, this escape code causes the LaserJet to prompt you to feed an envelope from the manual feed slot. (Make sure you have entered the appropriate formatting commands that work in conjunction with your PI code.) Refer to the XyWrite III Plus Reference Guide for more information on the PI command. Manually Printing an Envelope from the Standard Tray To print an envelope from the standard tray using the manual feed option: 1. Create a new file. Type: F5new envelope 2. Embed the TP (Top Margin) command. Be sure to use a value of zero. Type: F5tp 0 3. Embed the correct PC (Printer Control) command. For example: Type: F5pc 3 (or F5pi &l3H) Result: When you TYPE the file, the printer prompts you to manually feed the envelope from the standard 8-1/2 x 11 tray. 4. Embed the necessary formatting commands. For example: FD 45 PL 42,44,40 LM 52 RM 120 PT 5 (use the number associated with the landscape PT table in your printer file) 5. Type 19 carriage returns to give you a top margin of 20 lines. 6. Enter the name and address you want to type onto the envelope. Result: When in expanded mode, your completed file should look something like this: <><><><><><><> . . (19 carriage returns) . Catherine Cross 44 Manning Park Billerica, MA 01821 <> 7. Send the file to the printer. Type: F5type 8. On the LaserJet's manual feed slot, set the paper guides so that the envelope feeds through the center. Insert the envelope face up, stamp end first, into the printer. Printing an Envelope from the Envelope Tray This procedure is very similar to the previous one, but uses different values. To eliminate confusion, we have repeated each of the steps, using the values for a standard #10 envelope and the Hewlett Packard Series II envelope tray. 1. Create a new file. Type: F5new envelope 2. Embed the TP (Top Margin) command. Be sure to use a value of zero. Type: F5tp 0 3. Embed the correct PC (Printer Control) command. For example: Type: F5pc 5 (or F5pi &l8A) Result: When you TYPE the file, the printer prompts you with a message that tells you the size of the envelope it is expecting. 4. Embed the necessary formatting commands. For example: LM 40 RM 120 PT 5 (use the number associated with the landscape PT table in your printer file) 5. Type 8 carriage returns to give you a top margin of 9 lines. 6. Enter the name and address you want to type onto the envelope. Result: When in expanded mode, your completed file should look something like this: <><><><><> . . (8 carriage returns) . Catherine Cross 44 Manning Park Billerica, MA 01821 <> 7. Make sure the envelope tray is in the printer. 8. Send the file to the printer. Type: F5type Automatic Envelopes XYQUEST has created a program that lets you print an envelope to go with your letter without retyping the name and address. This program uses two files, ENVELOP.DOC and ENV.PGM, both of which are on the disk that accompanies this application note. To use the program: 1. Call ENVELOP.DOC to the screen and enter the PT command that corresponds to the landscape font you want to use. 2. Store ENVELOP.DOC. 3. Call your letter to the screen. Be sure the address block ends with two carriage returns. 4. Place your cursor on the first character of the addressee's name. 5. Run the program ENV.PGM: Type: F5run env.pgm Result: The program defines the address block (starting with the character under the cursor and ending with two carriage returns). It then copies the defined text into Save/Get E, enters the contents of Save/Get E into the file ENVELOP.DOC, and sends ENVELOP.DOC to the printer. Note #4 Modifying ENV.PGM. If you are using Save/Get E for another purpose, you can have ENVELOP.DOC and ENV.PGM use a different Save/Get. ENV.PGM assumes that ENVELOP.DOC is in the current directory. If it isn't, call ENV.PGM to the screen, move the cursor to the TY command, and add the path name to the filename specification. Refer to the programming section in Chapter 5 of the XyWrite III Plus Reference Guide for information on changing program files. Mail Merge You can use XyWrite's Mail Merge capability to print a series of envelopes. To do this: 1. Create the data file and enter the names and addresses on your mailing list. Be sure to use two carriage returns to separate each address. 2. Create the main file by following steps 1-5 under "Printing an Envelope from the Standard Tray" or "Printing an Envelope from the Series II Envelope Tray." 3. Type the appropriate FI and PF statements, followed by a PG (Page Break) command. When in expanded mode, your completed file should look something like this (if you are using the manual feed option with the standard tray): <><><><><><><> . . (19 carriage return characters) . <> <> <> <>, <> <> <> Result: You now have a standard envelope format file (main file) that can be used with different mailing lists (data files.) 4. Store the file and then send it to the printer (see Note #5). Type: F5st Type: F5type datafile+mainfile Note #5 Suppressing Printer Error Messages. While using the Mail Merge capability to print a series of envelopes, you may continually receive a printer error message on the prompt line. (The message indicates that the printer is waiting for you to put another envelope in the printer slot.) You can suppress the message and its corresponding beep as follows: Type: F5default NE=1 However, this disables all printer error messages until you either reboot the system or reset the default (default NE=0). PRINTING ON LEGAL-SIZED PAPER If you want to print on legal-sized paper (using the standard 8-1/2 x 11 tray), you must modify the document. 1. Call your document to the screen. 2. Embed the following Printer Control command at the beginning of the document: Type: F5pc 4 (or F5pi &l2H&l3A) 3. Enter the following FD (Form Depth) and PL (Page Length) commands: Type: F5fd 78 Type: F5pl 74,76,72 4. Print your document. Type: F5type USING SPECIAL CHARACTERS You can modify the HP LaserJet Series II standard internal fixed pitch fonts (standard or landscape MED-COURIER, BOLD-COURIER, LT-LINEPTR, 12COURIER) to access any of the four available internal symbol sets. The symbol sets available with these fonts are Roman 8 (8U), PC-8 (10U), PC-8 D/N (11U), and ECMA-94 Latin(0N). ASCII characters 0 through 31 do not print, no matter what set you are using. For ASCII characters 32 through 126, the printed symbol matches the symbol you see on your monitor. The output for ASCII characters 127 through 255 varies, depending on the specific symbol set you are using. The default symbol set is Roman 8. To change to a different set: 1. Call the printer file to the display. 2. Search for the standard internal font table. Type: F5se /standard internal fonts/ 3. Change the font definition to include the symbol set you want to use (after the first opening parenthesis) and place a semicolon in front of the line that says US:Roman8. For example, if you are currently using MED-COURIER with the Roman 8 symbol set and you want to switch to the PC-8 symbol set, change the font definition from 8U to 10U and comment out US:Roman8. BEFORE: ; FO:MED-COURIER FO<&l0O(8U(s0p10h12v0s0b3T VL=58 UW:10pitch US:Roman8 ET AFTER: ; FO:MED-COURIER FO<&l0O(10U(s0p10h12v0s0b3T VL=58 UW:10pitch ;US:Roman8 ET