APPLICATION NOTE #180 USING THE HP LASERJET IIP PRINTER WITH XYWRITE Rev. 01 This application note contains some tips for using a Hewlett-Packard LaserJet IIP printer with XyWrite III Plus, Version 3.55. It addresses those questions most frequently asked of XYQUEST's Technical Services Department regarding the LaserJet IIP. LASERJET SERIES IIP The LaserJet Series IIP, manufactured by Hewlett-Packard, is a laser printer with 512K of base memory (395K of user memory at powerup) and a multi-purpose paper tray for automatic and manual feeding of up to 50 sheets of paper. Optional lower cassette paper and envelope trays are available. The LaserJet Series IIP has seven internal fonts: 10-pitch and 12-pitch Courier, Courier Bold, and Courier Italic, and 17-pitch Line Printer. Each internal font supports 24 resident symbol sets. The most common symbol sets are Roman 8 (8U), PC-8 (10U), PC-8 D/N (11U), PC-850 (12U), and ECMA-94 Latin (0N). (A printed copy of these symbol sets is available on request.) In standard printing (also called portrait printing), characters are printed across the 8.5-inch dimension of the page. In landscape printing, characters are printed across the 11-inch dimension of the page. The fonts described above exist only as portrait fonts. However, the HP LaserJet Series IIP printer can automatically rotate fonts, so you can print your documents in either a portrait or a landscape page orientation. This characteristic doubles the number of available internal fonts, giving you a total of 14. The control panel on the LaserJet Series IIP provides a printing menu that allows you to set values for ten printing options. However, for XyWrite to effectively control the printer, these options must be established with XyWrite commands. Therefore, you need to set each of the printer options to its default value, as follows: MP SIZE Letter COPIES 1 FONT SRC I (internal) FONT NUM 0 TRAYS MP JOB SIZE Letter ORIENT P LINES OF TEXT 60 MAN FEED OFF SYM SET ROMAN-8 FORM DEPTH The LaserJet IIP 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 LaserJet IIP printer files. THE IIP PRINTER FILES The IIP printer files contain a PC (Printer Control) table, described on Page 2, that enables you to access various paper trays and select either portrait or landscape orientation. Normally, you use the PC command to invoke PC codes at a particular point in your text file. However, PC codes that select a specific tray conflict with the TP and RH commands. To solve this problem, XYQUEST developed the PB (Page Begin) command. PB is used instead of PC to send control strings that select the paper tray on the HP LaserJet IIP printer (see Note #1). The PB command has the format: PB # # is the row number in the PC Table corresponding to the control string you want to send (see below). _____________________________________________________________________ _________ # PC Code Size Tray Orientation 1 &l2A&l1H&l0O Letter Multipurpose (MP) Portrait 2 &l2A&l1H&l1O Letter MP Landscape 3 &l2A&l4H&l0O Letter Lower letter cassette (opt.) Portrait 4 &l2A&l4H&l1O Letter Lower Letter cassette (opt.) Landscape 5 &l3A&l2H&l0O Legal MP (manual feed) Portrait 6 &l3A&l2H&l1O Legal MP (manual feed) Landscape 11 &l3H&l1O Manual feed envelopes Landscape 12 &l81A&l4H&l1O #10 env Lower envelope cassette Landscape NOTE: The printer files also contain PC codes 7-10 and 13-22. Those PC codes are for use with the Series IID printer ONLY. Do not use them with the IIP printer. _____________________________________________________________________ _________ PB is an embedded command. Since it affects the page orientation (portrait or landscape), you must enter the PB command before any text or any PT (Print Type) commands. Also, enter the command before the page it is to affect. In a multi-page document, enter the PB command on the same line as the PG (Page Break) command, and then enter a carriage return. The PB command overrides any previous PB command in the file. For example, to print the first page of a file in landscape orientation and the second page in portrait orientation, both fed from the multi-purpose tray, your PB and PG commands should look like this: <><><><>This is page 1, landscape. This is the second line. <><> <><><>This is page two, portrait orientation. See "Landscape Printing" for more information. Note #1 PC Codes. You do not have to use the PB command to access all PC codes, only those that select paper trays. For example, you can develop an additional PC string to draw a rule across the middle of the paper using HP raster graphics commands. If you add that string to the PC table, you can access it with the PC command. CUSTOMIZING PRINTER FILES FOR BOTH SOFT FONTS AND FONT CARTRIDGES The XyWrite printer files fully support the internal fonts with all the internal symbol sets and the S2 font cartridge. Use the following procedure to customize the printer file for both soft fonts and font cartridges. (If you have a customized printer file already developed for use with the LaserJet IIP printer, see Note #2.) If you want to use a combination of soft font and font cartridges, as well as the IIP internal fonts, you can find the soft font or the cartridge information in one of the four available printer files listed below. File Supports 3IID-CRT.PRN All font cartridges 3IID-SFT.PRN AC/AD/AE/AF soft fonts 3IID-SF1.PRN DA/EA/RA soft fonts 3IID-SF2.PRN SA/TA/UA soft fonts 1. Copy the font definition, width table, and substitution table (if needed) from the appropriate printer file into your customized printer file. It is not necessary to copy the substitution table if it already exists in the file you are working with. The following is an example of a font definition, width table, and substitution table for the F cartridge font, 10 point Times Roman: FO:F*10TIMES FO<(8U(s1p10v0s0b5T VL=50 UW:F*10TIMES US:Roman8 ET WD:F*10TIMES SW=30 . . ET SU:Roman8 ø=³ . . ET 2. Create a PT Table that accesses the new fonts. (Refer to Application Note #162.) 3. Store and load the printer file. Make sure there are no error messages. Note #2 Existing Customized Printer File. Because the print head of the IIP printer rotates to allow any internal, cartridge, or soft font to be printed in either portrait or landscape orientation, the section of the font definition that normally specifies the orientation has been removed and included in the PC strings. If you have already developed a customized printer file for use with the LaserJet IIP printer, remove the orientation codes from the font definitions if you plan to use the IIP PC codes. To do this, go to the line that begins FO< and remove the string, &l0O. (If the font is a landscape font, the string you remove is &l1O.) The complete line now looks something like this: FO<(8U(s1p10v0s0b5T Also, make sure you copy the PC Table from the IIP printer file into your customized printer file and delete any existing PC Table. The font can now be printed in either portrait or landscape orientation when used in combination with the proper PB command (see the previous table). For more information, see "Landscape Printing" below. LANDSCAPE PRINTING Landscape printing (characters printed across the 11-inch dimension of the page) is useful when printing a spreadsheet, a document with many snaked columns, or an envelope. The LaserJet IIP printer allows you to print your documents in either portrait or landscape orientation, but does not allow you to mix portrait and landscape orientations on the same page (see Note #3). To activate landscape printing, select the PC number from the table on Page 2 that accesses landscape orientation as well as the paper size and tray you want to use. In your document, embed the PB command to access this PC code. Enter the PB command before the PT (Print Type) command. For example, to print a document on paper from the multi-purpose paper tray, using PT1 in a landscape page orientation: At the beginning of the file Type: F5pb 2 Type: F5pt 1 Result: When you type the document, the font specified by PT1 is printed in a landscape orientation on 8.5- by 11-inch paper fed from the multi-purpose paper tray. The XyWrite default settings in the IIP printer files are based on portrait printing. To use landscape printing effectively with these files, you must override the PL (Page Length), FD (Form Depth), and RM (Right Margin) 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 105.) 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 any other formatting commands you need. Don't forget to include a PB command and a PT (Print Type) command that reference the font you want to use. Result: Your document is now ready for landscape printing. Note #3 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 appropriate PB command to change orientation, followed by a PG command and a carriage return to end the page. PRINTING ON 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.) You also need to send a command string to the printer to set it up for envelope printing. The PC Table defines the required printer commands for several different envelopes: Standard 8-1/2 x 11 Tray PC11 Manual-fed envelopes from multi-purpose tray Optional Envelope Tray PC12 Feed Standard #10 envelope from the optional HP envelope tray To print an envelope: 1. Create a new file. Type: F5new envelope 2. Use the PB command to embed the correct PC number for the envelope tray or the size envelope you are using (PB 11 to manually feed #10 envelopes from the multi-purpose tray; PB 12 to automatically feed #10 envelopes from the optional envelope tray). For example: Type: F5pb 12 When you TYPE the file, the PC code accessed by the PB command adjusts the printer to accommodate the paper tray being used. The printer prompts you to manually feed the envelope from the multi-purpose tray or from the optional envelope tray. 3. Embed the necessary formatting commands. Optional Envelope Tray. The following list is an example of the formatting commands you might use if you were going to print on a standard #10 envelope from the optional envelope tray: PB 12 TP 8 LM 30 RM 90 PT 5 Manually Fed from the Multi-Purpose (MP Tray). The following list is an example of the formatting commands you might use if you were going to manually feed envelopes from the multi-purpose tray: PB 11 TP 8 LM 52 RM 90 PT 5 If you are using the IIP multi-purpose tray, set the paper guides so that the envelope feeds properly. Insert the envelope face down into the printer. 4. Enter the name and address you want to print on the envelope. Following the example above for printing on #10 envelopes from the optional envelope tray, your completed file should look something like this in expanded mode: <><><><><> Catherine Cross 44 Manning Park Billerica, MA 01821 5. 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 of the four available files: * IIP-AENV.DOC for feeding standard commercial #10 envelopes from the optional envelope tray. * IIP-MENV.DOC for manually feeding standard commercial #10 envelopes from the multi-purpose tray * IIP-AENV.PGM * IIP-MENV.PGM These files are included in the HP LaserJet IIP printer file package. Note #4 Printer Control Codes. IIP-AENV.DOC and IIP-MENV.DOC are set up to access Printer Control strings in IIP printer files. If you changed the order of these strings, you must change the PB and PT commands in the envelope files that correspond to the printer control string and the font you want to use. To use the program: 1. Call your letter to the screen. Be sure the address block ends with two carriage returns. 2. Place your cursor on the first character of the addressee's name. 3. Run the program (either IIP-AENV.PGM or IIP-MENV.PGM). For example: Type: F5run iip-menv.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 its corresponding file (in this case, IIP-MENV.DOC), and sends that file to the printer. Note #5 Changing the Save/Get Key. If you are using Save/Get E for another purpose, you can use a different Save/Get for IIP-AENV.PGM, IIP-MENV.PGM, and their matching .DOC files. Both programs assume that its matching .DOC file is in the current directory. If it isn't, call either IIP-AENV.PGM or IIP-MENV.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. Using Mail Merge to Print Envelopes You can use XyWrite's Mail Merge capability to print a series of envelopes as follows. 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 through 4 under "Printing on Envelopes." 3. Type the appropriate FI and PF statements, followed by a PG (Page Break) command. When in expanded mode, your completed file should look like this: <><><><><> <> <> <>, <> <> <> Result: You now have a standard envelope format file (main file) that feeds #10 standard envelopes from the optional envelope tray. You can use this format file with different mailing lists (data files.) 4. Store the file and then send it to the printer. Type: F5st Type: F5type datafile+mainfile Note #6 Suppressing Printer Error Messages. While using the Mail Merge capability to print a series of manually fed 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 multi-purpose tray), you must enter the appropriate PB command as well as make other modifications to the document. 1. Call your document to the screen. 2. Use the PB command to embed the correct PC code to print on manually fed, legal-sized paper in either a portrait or a landscape orientation (5 is for portrait printing; 6 is for landscape printing). Portrait Printing. If you want to use portrait printing, enter the following commands at the beginning of the document. Type: F5pb 5 Type: F5fd 78 Type: F5pl 74,76,72 Landscape Printing. If you want to use landscape printing, enter the following commands at the beginning of the document. Type: F5pb 6 Type: F5fd 45 Type: F5pl 42,44,40 Type: F5rm 130 3. Type your document. Type: F5type USING SPECIAL CHARACTERS In the 3HP-IID.PRN printer file, each of the seven internal fonts supports five internal symbol sets: Roman 8 (8U), PC-8 (10U), PC-8 D/N (11U), PC-850 (12U), and ECMA-94 Latin (0N). Each font has been assigned a specific name that includes a reference to the symbol set that it uses. For example, the name of the 12-pitch Courier font that uses the 10U (PC-8) symbol set is 12-COURIER-10U; the same 12-pitch Courier font that uses the 8U (Roman 8) symbol set is 12COURIER-8U, etc. The ASCII characters 32 through 126 print the same for each symbol set. Characters 1 through 31 print using the 10U, 11U, and 12U symbol sets with the PCSYMBOL substitution table. Characters 127 through 255 print depending on the specific symbol set you are using. Note #7 Legal Symbol Set. The LaserJet IID/IIP printer files also include the 1U (Legal) symbol set. This symbol set is not available in the IIP printer; it is included in the printer file for use with LaserJet IIDs only. ###