Microsoft KB Archive/114130

{| = Creating a Printer Driver Setup User Procedure =
 * width="100%"|

ID: Q114130

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, and 2.6

SUMMARY
The User Procedure option of the Printer Driver Setup dialog box allows additional control over printed output without changing the GENPD.APP printer driver program code. This article supplements the documentation on this option found in the FoxPro for MS-DOS "Developer's Guide" by providing an example of its usage.

MORE INFORMATION
The following steps demonstrate how to add a printer command to set a right margin of 50 for use with an HP LaserJet III.

Create the User Procedure program, named MARGIN50.PRG, as follows:

* M A R G I N 5 0. P R G Printer Driver Setup User Procedure *  * This program uses the first parameter passed to it from PDDOCST * routine found in the GENPD.APP driver program *  PARAMETER parm1 RETURN parm1 + CHR(27) + "&a50M" To link the procedure with the printer driver setup, do the following: 1. From the File menu, choose Printer Setup (or choose Layout from the

Report menu if you are in a report). 2. Select the Printer Driver Setup check box. 3. Choose New to create a new setup or choose Edit to edit an existing

driver setup. 4. In the Printer Driver Setup dialog box, select the options you want, and then select the User Procedures check box. 5. Select the Document check box in the Start section to bring up the file selection popup. 6. Select the MARGIN50.PRG file. Additional reference words: FoxDos escape codes pddocst pddocend pdpagest pdpageend pdlinest pdlineend pdobjst pdobjend pdobject genpd 2.00 2.50 2.50a 2.50b 2.60 KBCategory: kbprint kbsetup kbprg KBSubcategory:
 * }