![]() |
Creating Printer Macros |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
Solutions: Section I. Creating the Macro What is a printer macro? A printer macro is a group of commands or data that is sent to the printer and held resident in the printer's memory for quick easy access. An example would be a company letterhead or other redundant or frequently printed information. Printer macro requirements: Very little is required to create and use a printer macro. The only real consideration is available printer memory, and Hewlett Packard can even make custom printer macro cartridges to minimize the amount of memory used. The user will need knowledge of the Printer Command Language and its syntax, a knowledge of a text editing program, PTR, or other programming application. Printer Macro Commands/Language The creation of a macro follows a 5 step plan. Each step has its corresponding command--and all commands, the syntax, and examples of each are outlined in Chapter 11 of the HP Technical Reference Manual. Step one: Give the macro a name. Macros are given numerical names, anything between 0 and 32767 is a valid name. Example: [27]&f1372Y - This will establish a macro with the name 1372. If two macros are sent with the same name, the first will be deleted and replaced by the last. Step two: Start the macro. Your printer will need a special code to enable it to recognize the macro commands and/or data as such; or it will process the information as it receives it and print it out as text. Example: [27]&f0X - This command simply tells the printer that anything following this command is not to be processed but remembered until further notice. Step three: Enter the actual commands and data that make up the body of the printer macro. See Section III. Step four: End the macro. After all of your commands and data have been entered, you must tell the printer it can stop remembering the data input and execute any commands following this command. Example: [27]&f1X - This command ends the macro. Anything sent after this command will be executed or processed as usual. Step five: Designate what type of macro it is to be. There are three basic types, Temporary, Permanent, and Automatically Overlaid. A temporary macro is virtually useless and self defeating so this memo will not cover it. An overlaid macro is beyond the scope of this memo so it will not be covered either. A permanent macro can be thought of like a soft font. It is stored in the printer's RAM and is accessed by its ID number, like a soft font. In many ways they act the same and come in the same forms--downloaded and cartridge. Example: [27]&f10X - This designates the macro as permanent in RAM memory. It can be cleared only by turning off the printer or sending a delete macro command. Section II. Using the Macro Macro Invocation There are three ways to invoke a printer macro. You can execute it, call it, or enable it to be automatically overlaid. Each operates in a different printer environment. (See Chapter 3 of the HP Technical Reference Manual for more information on printer environments). Examples: [27]&f2X this will execute the macro [27]&f3X this will call the macro [27]&4X this will enable for overlay For a complete reference see chapter 11 page 11-8 in the HP Technical Reference Manual. These commands can be copied into a file and sent to the printer via DOS if you do not have software capable of sending printer commands. Section III. Creating Printer Macros with WordPerfect Printer Macros with WordPerfect, DrawPerfect, and Program Editor The easiest way to make a printer macro is to make a document (or whatever it is you want to be stored in printer memory), the same as if you were going to print it out. However, instead of printing it to your printer, make a print to disk file. Next retrieve the file into Program Editor or another editing program. Delete all of the Initialize at Start of Print Job commands that the .PRS file puts in. For example, the commands to delete if your printer is an HP LaserJet III or IIID will be: ^[&l0l6D^[&l0S^[&l1x0o0E^ [9^[*r0F^[*v0n1O^[*p4300X^[%1BDT~,1TR0TD1SP 1FT10,50CF3,1LB.~;^[%1A^[*c100G^[*v2T^[&a0P^. If you are using any other HP printer, delete the following codes: ^[&l0l6D^[*r0F^[&l0S^[&l0o0E^. You will need to delete the entire sequence of code. Next, you will need to type in the macro name, and start the macro command in the place of the codes you just deleted by following these keystrokes: Ctrl-V, Esc, &f#Y, Ctrl-V, Esc, &f0X (# = the numeric name of the macro). Next, cursor to the end of the document and delete the reset commands inserted by the .PRS file. For the HP III and IIID, the codes will be: ^[&l1H^[&l0S^[*rB^[&l1l1h0o0E^[(8U^[(sp10h12vsb 3T^[&d@^[E. For other HP printers, the commands will be: ^[&l0S^[*rB^[&l1l1h0o0E^[(8U ^[(sp10h12vsb3T^[&d@^[E Next, you will need to enter the commands mentioned in steps 4 and 5. These will end the macro and designate it as permanent. Ctrl-V, Esc, &f1X, Ctrl-V, Esc, &f10X Notice that WordPerfect and DrawPerfect have done the third and most complex part of the macro creation process for you. Lastly, you will need to save this file and use the DOS copy command to send it to the printer. It is now ready for you to use. Section IV. Using the Macro with a WP Document Follow these keystrokes in WordPerfect: Shift-F8, 2, 4, 6, 2, 1. For the command, enter the following: <27>&f#y#X. Note: The <27> is the Escape code. The first # will be the macro numeric name and the second # will be the code for (2) Execute, (3) Call, or (4) Overlay. Add any formatting codes necessary. Miscellaneous notes: The cursor position is not saved when the printer macro is executed. Therefore, Advance codes can be used to position the text following a macro, or the text will begin from the position where the macro ended. Put the Advance code, and other formatting codes right in the macro so the text will begin at the proper place. This allows for formatting in the document without needing formatting codes from the program. Some printers (HP LaserJet III, HP LaserJet IIID, Canon LBP 4, Canon LBP-8III, etc.) can do many things WP cannot. The PCL codes can be entered from Program Editor to perform these functions. To get the Escape code, press Ctrl-V, Esc. Printer macros are available in PostScript printers as well. The principles for the macros are basically the same, but the PostScript language is much more complicated than the PCL. There is no known way to check the printer's memory to see if the macro has been successfully downloaded. A printer macro cannot be accessed from DrawPerfect, but DrawPerfect files can be imported into WordPerfect and accessed in that way. Tables work well as a printer macro. Create two tables in WP, one with lines and one without. Use the lined table as a macro, and the other table as the print file. This allows for faster printing of tables. Section V. Printer Macros and the PTR Program The PTR program has the easiest way to create and download a printer macro that has been used to create a special .ALL file and .PRS file. It is really simple if you have a basic knowledge of the PTR program. 1. Retrieve the .ALL file that contains the user's .PRS file. Delete all of the printers except the one he is using. 2. When all the other printers have been deleted, press the Enter key. Initialize and Reset will be highlighted. Press Enter twice. On the expressions side of the screen, delete all the information. 3. Now that the right side is empty, press Alt-F8 for the global variables, and press 1 for Add. 4. Press Ctrl-Enter for default. Type the macro name and press Enter. Press 1 for add, then press Ctrl-Enter for default. 5. Type MACROSTART and press Enter. Press 1 for Add, and Ctrl-Enter for the default. Type MACROEND and press Enter. Press 1 for Add. Press Ctrl-Enter for default. Type MACROPERM and press Enter. 6. Highlight MACROEND and press Enter. Press the Escape key, and type: "&f1X." Press Enter, and the press Escape. Type: "&f#Y." Note: the (#) is the numeric name you gave the macro. Press Enter, then Escape, and type: "&f10X." Press Enter, then Escape, and type: "&f0X." Now all of the global variables have codes to the right of them. 7. Press F7 twice. Move the cursor to Initialize at Start of Print Job so it is highlighted. Type MACRONAME MACROSTART. Press Enter. Type MACROEND MACROPERM. Press F7 until you get to the screen where your printer is listed. Choose 3 for Rename. At the prompt, type Printer Macro Number #. 8. Press F7, and choose Yes to save the file. For filenames, DO NOT USE THE ORIGINAL .ALL FILENAME. Type in PMACRO.ALL or some other name, and press Enter. After the file is saved, exit the PTR program and enter WP. In WordPerfect, select the printer you named a Printer Macro # from additional printers. With this definition files can be created normally. When the files are printed, they will be sent to the printer as printer macros, not text. They can be accessed as mentioned above using the normal printer driver. |
Answer:
Details:
Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER. |