Brief: Getting the fonts you need from a PC printer can be more cost-efficient than using an AS/400 printer. This article explains a technique that allows you to utilize all the fonts available through PCL5-capable PC printers, from an AS/400 RPG program.
If you wanted to print the title of a report in a large typestyle and the body in a standard, 10 characters per inch font, would your printer be able to do it? Could you print a disclaimer at the bottom of an invoice in small print? If your company uses PC laser printers that support the HP PCL5 control language, you can. You don't need intelligent printer datastream (IPDS), Advanced Function Printing (AFP), or even an electronic forms design program to do it. All that's required is your PCL5 printer, your skill as an RPG programmer, and a little bit of knowledge.
PCL5 is a printer control language designed by Hewlett Packard (HP) for use with their laser printers. As HP laser printing became a standard at the desktop, so too did the PCL5 language. Many other printers, including IBM Lexmark, emulate HP PCL5. But, the translation of the power of the PCL5 has always been a problem for those of us sending AS/400 printer datastreams through PC Support (Client Access). We had no way to take advantage of the inherent power of all those built-in laser fonts. Our options seemed limited to either buying IPDS printers, or paying for third-party software to manipulate the laser printers.
With the technique presented in this article, you will be able to use all of your laser printer's resident fonts in your RPG output. 1 shows the results you can achieve. This article provides a sample of the commands needed to print your text in these different size fonts. Although the commands shown here barely scratch the surface of the fonts available, they provide useful choices for report titles, fine print, and words or totals that need to be emphasized.
With the technique presented in this article, you will be able to use all of your laser printer's resident fonts in your RPG output. Figure 1 shows the results you can achieve. This article provides a sample of the commands needed to print your text in these different size fonts. Although the commands shown here barely scratch the surface of the fonts available, they provide useful choices for report titles, fine print, and words or totals that need to be emphasized.
There are several advantages to this technique. First, PC-based printers using PCL5 are less expensive than AFP or IPDS printers when used for comparable performance. Second, PCL5 has become an industry standard laser printer control language outside of the IBM midrange world. Third, the printing performance is very good, and the results are beautiful.
You will be using fonts that are resident in the printer, and the commands sent are a negligible addition to your text. Also, it is easy to get consistent results using the file suggested here to store proven commands in a format that is ready to use and already translated to ASCII, so you are not depending on multiple ASCII conversion tables on multiple PCs.
There are disadvantages as well. For example, spooled output created with embedded PCL5 commands cannot be moved to another type of printer and printed correctly. The commands print as garbage characters or cause an error due to unreplaced, unprintable characters.
Of course, IPDS spooled files have the same disadvantage. Unlike IPDS, though, with the technique presented here, the AS/400 does not have to know what kind of printer will be used when the output is being created. This allows more flexibility in moving the spooled files between HP laser printers after they are in the output queue.
Another disadvantage is that changing a printer configuration to Host Print Transform moves the burden of all print translation sent to this printer from the PC to the AS/400. This puts a fairly significant burden on the AS/400 whenever this printer is being used.
Although this article addresses font commands, the same technique can be used for other PCL5 commands. For example, you can send commands for margin control, drawer selection, output bin, and macros. I use the drawer selection command when I want to pull a different color paper from the lower paper tray for some pages of a printout. Since this occurs in the middle of a spool file, an Override with Printer File (OVRPRTF) would not have been an easy solution.
Using Your Printer's Resident Fonts
The first challenge to someone sending commands from the AS/400 to a PC printer is figuring out how to send the ASCII escape (ESC) character. In PCL5, this character signals the printer that a command is starting. Some programmers have accomplished this by changing the EBCDIC-to-ASCII conversion table in PC Support to translate a special character to ASCII ESC (see "Creating Barcodes on a Budget," MC, April 1994). However, if you have printers attached to dozens of PCs at dozens of sites working on multiple projects, this is not an easy setup to maintain. What if someone else installs a special conversion table on one of the PCs to handle some other special characters? Your printer control commands will fail, and figuring out why (and how) the conversion table is different is not simple.
The solution presented in this article takes advantage of the ASCII Transparent Data Command (ATRN) IBM includes with PC Support (see PC Support/400 Technical Reference). The ATRN code allows you to control the translation of the PCL5 command to ASCII on the AS/400. Then, when the AS/400 sends the datastream to PC Support, ATRN transparently passes the codes to the printer without translation.
This has the advantage of sending commands that are consistently translated on the AS/400, which is an appropriate server function. The only change needed on PCs with PCL5 printers is to specify that the print transform is to take place at the host. If you are using an electronic forms software package with ASCII transparency, you may have already made this change.
1. Configure an HP laser printer (or printer with HP emulation) on the AS/400 using PC Support. Set the location of print transform to Host System. 2. Modify a printer file or use the OVRPRTF command to not replace unprintable characters [RPLUNPRT(*NO)]. 3. Include a printer command string (translated to ASCII) in your output with the two-byte ATRN code.
Creating and Storing PCL5 Commands in ASCII
2 lists the five PCL5 font control commands that were used to generate the sample fonts in 1. The commands are stored in file PCL5CMDS. Storing the PCL5 commands in a file allows you to create a command once and reuse it from your RPG or other HLL program.
Figure 2 lists the five PCL5 font control commands that were used to generate the sample fonts in Figure 1. The commands are stored in file PCL5CMDS. Storing the PCL5 commands in a file allows you to create a command once and reuse it from your RPG or other HLL program.
To maintain the PCL5CMDS file, I have created the Work with PCL5 Commands (WRKPCLCMD) command. The maintenance screen is shown in 3.4, 5, 6, and 7 list the source members required by the utility. With the WRK-PCLCMD, you can add font commands of your own choosing to PCL5CMDS.
To maintain the PCL5CMDS file, I have created the Work with PCL5 Commands (WRKPCLCMD) command. The maintenance screen is shown in Figure 3. Figures 4, 5, 6, and 7 list the source members required by the utility. With the WRK-PCLCMD, you can add font commands of your own choosing to PCL5CMDS.
4 contains the command definition source for the WRKPCLCMD command; 5 contains the DDS for the PCL5CMDS physical file; 6 contains the DDS for display file PCL001DF; and 7 contains the RPG source for the command processing program PCL001RG.
Figure 4 contains the command definition source for the WRKPCLCMD command; Figure 5 contains the DDS for the PCL5CMDS physical file; Figure 6 contains the DDS for display file PCL001DF; and Figure 7 contains the RPG source for the command processing program PCL001RG.
Program PCL001RG converts the EBCDIC codes to PCL5 Printer Command Escape Sequences and then stores them in the PCL5CMDS file for use by programs that create printed output. Program PCL002RG (see 8) is a specimen program that uses the commands stored in the PCL5CMDS file.
Program PCL001RG converts the EBCDIC codes to PCL5 Printer Command Escape Sequences and then stores them in the PCL5CMDS file for use by programs that create printed output. Program PCL002RG (see Figure 8) is a specimen program that uses the commands stored in the PCL5CMDS file.
Print programs can use commands from the PCL5CMDS file as needed. Even after you know what PCL5 commands are needed, entering ASCII in hexidecimal (HEX) on the AS/400 would be very awkward to do with a file editor. WRKPCLCMD solves the problem by allowing a programmer to create a key that will define a desired font. The PCL5 command to specify the font is then typed on the screen normally (in EBCDIC).
The only unique keying necessary is to use the logical not character () [HEX (5F) in EBCDIC] whenever the ASCII ESC character is needed. The () character can be created on most AS/400 terminals by pressing Shift+6. If you can't find the () character on your keyboard, you can use the (HEX+5F) key combination to create it.
When you enter the code and the command assigned to a font, program PCL001RG (see 7) translates the command to ASCII, attaches the ATRN code, and stores it in PCL5CMDS file as field HPCMDA. Whenever you want to change to a different font in your output, simply retrieve this field from the PCL5CMDS file and include it in your output, as illustrated in program PCL002RG in 8. You can use the WRKPCLCMD command to modify an existing font in the PCL5CMDS file or create new ones.
When you enter the code and the command assigned to a font, program PCL001RG (see Figure 7) translates the command to ASCII, attaches the ATRN code, and stores it in PCL5CMDS file as field HPCMDA. Whenever you want to change to a different font in your output, simply retrieve this field from the PCL5CMDS file and include it in your output, as illustrated in program PCL002RG in Figure 8. You can use the WRKPCLCMD command to modify an existing font in the PCL5CMDS file or create new ones.
The key fields in the PCL5CMDS file specify the typeface family, characters per inch or pitch, degree of boldness, and upright or italic feature of the font being created. For example, a useful font to emphasize text in a report using 12 characters per inch might have these key fields.
o HPTYPE: COURIER o HPSIZE: 12 o HPBOLD: B o HPITAL: R
The length of the command is defined as 50 [HEX (32)] in program PCL001RG (see the highlighted statement in 7). This will become the second byte of the ATRN command, which defines the number of characters PC Support should ignore (i.e., pass transparently) when you send an ASCII command. Fifty is an arbitrary number, chosen because it provides plenty of room for even a complicated font command, yet it fits easily on a screen. If you change field HPCMDA in PCL5CMDS to a different ASCII command field length, you must also change this constant.
The length of the command is defined as 50 [HEX (32)] in program PCL001RG (see the highlighted statement in Figure 7). This will become the second byte of the ATRN command, which defines the number of characters PC Support should ignore (i.e., pass transparently) when you send an ASCII command. Fifty is an arbitrary number, chosen because it provides plenty of room for even a complicated font command, yet it fits easily on a screen. If you change field HPCMDA in PCL5CMDS to a different ASCII command field length, you must also change this constant.
Sample Print Program Using ASCII Command Strings
8 lists the source code for program PCL002RG, which prints the fonts provided in file PCL5CMDS. The output from PCL002RG is shown in 1. This program illustrates how easy it is to use the commands from this file to produce great results.
Figure 8 lists the source code for program PCL002RG, which prints the fonts provided in file PCL5CMDS. The output from PCL002RG is shown in Figure 1. This program illustrates how easy it is to use the commands from this file to produce great results.
The highlighted code in 8 shows the printer file override required whenever you're embedding ASCII command strings in your output. The unprintable character action (RPLUNPRT) parameter of the OVRPRTF command must be set to a value of (*NO), which prevents the unprintable characters in your PCL5 command strings from being automatically replaced with blanks.
The highlighted code in Figure 8 shows the printer file override required whenever you're embedding ASCII command strings in your output. The unprintable character action (RPLUNPRT) parameter of the OVRPRTF command must be set to a value of (*NO), which prevents the unprintable characters in your PCL5 command strings from being automatically replaced with blanks.
The first two output specifications of program PCL002RG are used to clear the line. They are necessary if your first output is a command string. If these specifications are not used, you will print one or more @ characters where your command is placed. [On an ASCII chart, the @ character is ASCII HEX (40), which is equivalent to the EBCDIC (SPACE) characters on the uncleared line.]
PCL Tips
If you open an HP printer manual to the section on PCL5 programming, you will find dozens of commands. You can simply copy the examples in this article to create command strings for many useful fonts. A few minor changes will expand these to a virtually unlimited number of sizes and styles.
PCL5 commands are always case-sensitive. Some commands can be continued without including another ESC character by changing the last letter to lowercase. You can string commands together to define all of the characteristics of a desired font. 9 illustrates the anatomy of a PCL5 font command string.
PCL5 commands are always case-sensitive. Some commands can be continued without including another ESC character by changing the last letter to lowercase. You can string commands together to define all of the characteristics of a desired font. Figure 9 illustrates the anatomy of a PCL5 font command string.
In most report printing, you should stay with fonts that use fixed spacing (i.e., use pitch, not points). It is easy to calculate where to place an 8- characters-per-inch report title, but it is much harder to plan an ending position for proportionally spaced printing. Also, if you're printing a variable field, proportional spacing will cause the starting point to move based on how wide the characters in the field are.
To learn more about PCL5, print out the resident fonts available on the printer you want to use. Follow the instructions in the printer manual. Second, refer to the section of the printer's manual on printer commands. Now that you know how to get these commands into your RPG output, and you have some examples and their results, PCL5 will start to make sense.
If you want complete documentation and you really want to open up the potential in PCL5 printing, order the "PCL5 Printer Language Technical Reference Documentation Package" from HP.
Debug Hints
If your printed output is not correct, you may want to see the commands that are being put into your output. If you view the output (for example, using WRKSPLF), you can see the command, but the command characters aren't readable. The line numbers shown on this screen may be wrong due to the insertion of the ASCII commands using the space-zero-before technique that overlays the commands on your text.
A better view can be obtained by placing PCL002RG in debug mode. Add a break point somewhere after the program has retrieved a record from the PCL5CMDS file. Display the HPCMDA field with the DSPPGMVAR command specifying *HEX in the OUTFMT parameter. Your display should look like 10. The first two bytes should be the ATRN code, which is made up of HEX (03), and the length of the command that is to be transparent to PC Support's translation. The remainder of the field is your command in ASCII HEX.
A better view can be obtained by placing PCL002RG in debug mode. Add a break point somewhere after the program has retrieved a record from the PCL5CMDS file. Display the HPCMDA field with the DSPPGMVAR command specifying *HEX in the OUTFMT parameter. Your display should look like Figure 10. The first two bytes should be the ATRN code, which is made up of HEX (03), and the length of the command that is to be transparent to PC Support's translation. The remainder of the field is your command in ASCII HEX.
Great Looking Forms
If your shop has PC laser printers and you're using PC Support/400, you can start exploring the diverse font capabilities of those printers, right from your AS/400. You can create great-looking forms without expensive IPDS or AFP printers or a forms design system.
Ann Willyard is a programmer/analyst for Sierra Pacific Industries. She earned her CCP in 1992.
References PCL5 Printer Language Technical Reference Documentation Package (HP Part: 5961- 0997). PC Support/400 Technical Reference for DOS and OS/2 (SC21-8091, CD-ROM QBKA6702).
Use PC Laser Printer Fonts in your RPG Output
Figure 1 Sample Fonts from PCL5CMDS File
UNABLE TO REPRODUCE GRAPHICS
Use PC Laser Printer Fonts in your RPG Output
Figure 2 Sample PCL5 Font Control Commands in EBCDIC Format
Description EBCDIC Command CG Times 20 Point Proportional (8U(s1p20v0s3b4101T Courier 8 cpi Bold (8U(s0p8h0s3b4099T Courier 12 cpi Regular (8U(s0p12h12v0s2b4099T&k10H Courier 15 cpi light italic (8U(s0p15h8.5v1s0b4099T Univers 9 Point Proportional (8U(s1p9v0s0b4148T
Use PC Laser Printer Fonts in your RPG Output
Figure 3 The WRKPCLCMD Display File
UNABLE TO REPRODUCE GRAPHICS
Use PC Laser Printer Fonts in your RPG Output
Figure 4 The Work with PCL5 Commands (WRKPCLCMD) Command
/*===============================================================*/ /* To compile: */ /* */ /* CRTCMD CMD(XXX/WRKPCLCMD) PGM(XXX/PCL001RG) + */ /* SRCFILE(XXX/QCMDSRC) */ /* */ /*===============================================================*/ WRKPCLCMD: CMD PROMPT('Work with PCL5 Commands')
Use PC Laser Printer Fonts in your RPG Output
Figure 5 The PCL5CMDS Physical File DDS
*=============================================================== * To compile: * * CRTPF FILE(XXX/PCL5CMDS) SRCFILE(XXX/QDDSSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A R PCL5CMDR * A HPTYPE 15 COLHDG('TYPEFACE FAMILY') A HPSIZE 3 0 COLHDG('CPI OR PITCH') A HPBOLD 1 COLHDG('B=BOLD,R=REGULAR') A HPITAL 1 COLHDG('U=UPRIGHT,I=ITALICS') * A HPDSCR 50 COLHDG('DESCRIPTION') A HPCMDE 48 COLHDG('EBCDIC' 'COMMAND') A HPCMDA 50 COLHDG('ASCII' 'COMMAND') * A K HPTYPE A K HPSIZE A K HPBOLD A K HPITAL *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
Use PC Laser Printer Fonts in your RPG Output
Figure 6 The PCL001DF Display File DDS
A*% TS SD 19950103 142016 SHARIC REL-V3R1M0 5763-PW1 A*=============================================================== A* To compile: A* A* CRTDSPF FILE(XXX/PCL001DF) SRCFILE(XXX/QDDSSRC) A* A*=============================================================== A*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A*% EC A DSPSIZ(24 80 *DS3) A PRINT A R SCREEN1 A*% TS SD 19950103 142016 SHARIC REL-V3R1M0 5763-PW1 A TEXT('Key') A CA03(03 'F3=Exit') A 3 19'ASCII Escape Commands for HP Print- A er Control' A DSPATR(HI) A 6 10'Enter key of record to add or modi- A fy:' A COLOR(BLU) A 8 13'Typeface Family....' A S1TYPE 15A B 8 35 A 9 13'Size (CPI or pitch)' A S1SIZE 3Y 0B 9 35EDTCDE(Z) A 10 13'Bold/Regular.......' A S1BOLD 1A B 10 35 A 11 13'Upright/Italic.....' A S1ITAL 1A B 11 35 A 23 2'F3=Exit' A COLOR(BLU) A R SCREEN2 A*% TS SD 19950103 142016 SHARIC REL-V3R1M0 5763-PW1 A TEXT('Command') A CA03(03 'F3=Exit') A CA12(12 'F12=Previous') A 3 19'ASCII Escape Commands for HP Print- A er Control' A DSPATR(HI) A 6 19'Record key:' A 7 21'Typeface Family....' A S2TYPE 15A O 7 42 A 8 21'Size (cpi or pitch)' A S2SIZE 3Y 0O 8 42EDTCDE(Z) A 9 21'Bold/Regular.......' A S2BOLD 1A O 9 42 A 10 21'Upright/Italic.....' A S2ITAL 1A O 10 42 A 14 5'Command in EBCDIC..' A S2CMDE 48A B 14 27CHECK(LC) A DSPATR(PC) A 15 27'(Use "ª" (logical not) for ESCAPE)' A 18 5'Description........' A S2DSCR 50A B 18 27CHECK(LC) A 23 2'F3=Exit' A COLOR(BLU) A 23 12'F12=Previous' A COLOR(BLU)
Use PC Laser Printer Fonts in your RPG Output
Figure 7 The PCL001RG RPG Program
*=============================================================== * * PCL001RG * * Create or Modify PCL5 Commands * * This program allows a command to be typed in EBCDIC, then * translates it to ASCII and attaches the ASCII Transparent * Data Command (ATRN) required by PC/Support. The ASCII command * can be used directly in RPG output to control fonts. * This is a bare-bones example that illustrates the steps * necessary to create ASCII commands. *=============================================================== * To compile: * * CRTRPGPGM PGM(XXX/PCL001RG) SRCFILE(XXX/QRPGSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FPCL001DFCF E WORKSTN FPCL5CMDSUF E K DISK A * E CMD 50 1 * I DS I 1 50 CMD I 1 50 CMDSTG * * ESCAPE: Type 'ª'on the screen. * This program replaces it with HEX(27) in EBCDIC. * QDXLATE is used to translate to HEX(1B), ASCII ESCAPE. I X'27' C ESCAPE * ATRN: ASCII Transparent Data Printer Command I X'03' C HEX3 * Binary count of the number of bytes of transparent data * that PC/Support should not translate. Length is 50. I X'32' C HEXLGH * C HPKLST KLIST C KFLD HPTYPE C KFLD HPSIZE C KFLD HPBOLD C KFLD HPITAL * Screen1 C AGAIN TAG C EXFMTSCREEN1 C *IN03 IFEQ *ON C MOVE *ON *INLR C RETRN C END C S1TYPE IFEQ *BLANKS C S1SIZE OREQ 0 C S1BOLD OREQ *BLANKS C S1ITAL OREQ *BLANKS C GOTO AGAIN C END C CLEARSCREEN2 C MOVE S1TYPE HPTYPE C MOVE S1SIZE HPSIZE C MOVE S1BOLD HPBOLD C MOVE S1ITAL HPITAL C HPKLST CHAINPCL5CMDR N25 C *IN25 IFEQ *OFF C MOVE HPCMDE S2CMDE C MOVE HPDSCR S2DSCR C END C MOVE S1TYPE S2TYPE C MOVE S1SIZE S2SIZE C MOVE S1BOLD S2BOLD C MOVE S1ITAL S2ITAL * Screen2 C EXFMTSCREEN2 C *IN03 IFEQ *ON C MOVE *ON *INLR C RETRN C END C *IN12 IFEQ *ON C GOTO AGAIN C END *--- Add/update command C HPKLST CHAINPCL5CMDR 25 C MOVE S2CMDE HPCMDE C EXSR TRNLAT C MOVE ASCSTG HPCMDA C MOVE S2DSCR HPDSCR C *IN25 IFEQ *ON C MOVE S2TYPE HPTYPE C Z-ADDS2SIZE HPSIZE C MOVE S2BOLD HPBOLD C MOVE S2ITAL HPITAL C WRITEPCL5CMDR C ELSE C UPDATPCL5CMDR C END C CLEARSCREEN1 C GOTO AGAIN *================================================================** C TRNLAT BEGSR *================================================================** * Replace 'LOGICAL-NOT' with HEX(27), which will be translated * to ASCII HEX(1B) C MOVEAS2CMDE CMD C DO 50 Y 30 C CMD,Y IFEQ 'ª' C MOVE ESCAPE CMD,Y C END C ENDDO 10 * Translate Command to ASCII C Z-ADD50 BUFLEN 50 C MOVELCMDSTG BUFFER 50 C MOVEL'QASCII' SBSTBN 10 P C MOVEL'QSYS' SBSTBL 10 P C CALL 'QDCXLATE' C PARM BUFLEN C PARM BUFFER C PARM SBSTBN C PARM SBSTBL * Place two-byte ATRN code in front of command C HEX3 CAT HEXLGH:0 ASCSTG 50 C ASCSTG CAT BUFFER:0 ASCSTG C ENDSR
Use PC Laser Printer Fonts in your RPG Output
Figure 8 The PCL002RG RPG Program
*=============================================================== * * PCL002RG * * Print sample text in PCL5 fonts. * * This program uses the commands created in PCL001RG and stored * in PCL5CMDS to print a page of sample fonts available. * * It serves as an example of the technique as well as for testing * the fonts on a printer. *=============================================================== * To compile: * * CRTRPGPGM PGM(XXX/PCL002RG) SRCFILE(XXX/QRPGSRC) * *=============================================================== *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FPCL5CMDSIF E K DISK FQSYSPRT O F 80 PRINTER UC I 'OVRPRTF - C OVRPRT I 'FILE(QSYSPRT) - I 'TOFILE(QSYSPRT) - I 'PAGESIZE(66 85) - I 'RPLUNPRT(*NO)' C HPKLST KLIST C KFLD HPTYPE C KFLD HPSIZE C KFLD HPBOLD C KFLD HPITAL C CALL 'QCMDEXC' C PARM OVRPRT CMD 100 C PARM 100 CMDLEN 155 C OPEN QSYSPRT * *--- Clear the line C EXCPT$HEAD * *--- Courier 8 cpi Bold Upright C MOVEL'COURIER' HPTYPE P C Z-ADD8 HPSIZE C MOVE 'B' HPBOLD C MOVE 'U' HPITAL C HPKLST CHAINPCL5CMDR 25 C EXCPT$LINE * *--- Courier 12 cpi Regular C MOVEL'COURIER' HPTYPE P C Z-ADD12 HPSIZE C MOVE 'R' HPBOLD C MOVE 'U' HPITAL C HPKLST CHAINPCL5CMDR 25 C EXCPT$LINE * *--- CG Times 20 point proportional C MOVEL'CGTIMES' HPTYPE P C Z-ADD20 HPSIZE C MOVE 'B' HPBOLD C MOVE 'U' HPITAL C HPKLST CHAINPCL5CMDR 25 C EXCPT$LINE * *--- Univers 9 point proportional C MOVEL'UNIVERS' HPTYPE P C Z-ADD9 HPSIZE C MOVE 'R' HPBOLD C MOVE 'U' HPITAL C HPKLST CHAINPCL5CMDR 25 C EXCPT$LINE * *--- Courier 15 cpi light italic C MOVEL'COURIER' HPTYPE P C Z-ADD15 HPSIZE C MOVE 'R' HPBOLD C MOVE 'I' HPITAL C HPKLST CHAINPCL5CMDR 25 C EXCPT$LINE * C MOVE *ON *INLR C CLOSEQSYSPRT C RETRN * *------------------------------------ Clear Output Line--------* OQSYSPRT E 02 $HEAD O 1 ' ' * O E 11 $HEAD O 24 'Sample Fonts from PCL5CM' O 31 'DS file' * O E 11 $HEAD O 24 'Put Pizazz in your RPG O' O 48 'utput ! Instead of limi' O 72 'ting your reports to ' * O E 3 $HEAD O 24 'this boring typestyle, t' O 48 'ry using one of these. Y' O 72 'our users will notice ! ' * *------------------------------------ Command to change font O E 00 $LINE O HPCMDA 50 * *------------------------------------ Sample Print O E 03 $LINE O HPDSCR 50 *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
Use PC Laser Printer Fonts in your RPG Output
Figure 9 Anatomy of a PCL5 Command String
UNABLE TO REPRODUCE GRAPHICS
Use PC Laser Printer Fonts in your RPG Output
Figure 10 PCL5 Debugging Example
UNABLE TO REPRODUCE GRAPHICS
LATEST COMMENTS
MC Press Online