SET PDSETUP Command
Loads a printer driver setup or clears the current printer driver setup.
SET PDSETUP TO [[cPrinterDriverSetup [, Parameter1[, Parameter2 ...]]] [WITH Parameter3 [, Parameter4 ...]]]
Specifies the name of the printer driver setup to load.
When you load a printer driver setup, the name of the setup is stored in the _PDSETUP system variable, and a special variable array, _PDPARMS, can be created. (_PDPARMS is discussed in detail under the WITH clause in this topic.)
If the printer driver setup name you specify with cPrinterDriverSetup doesn't exist in your resource file, the current printer driver setup application is executed so you can create a setup with this name. If the current printer driver setup application is Genpd.app, the Printer Setup Editing dialog box appears so you can create the setup.
If the setup name begins with a dash (-), the _GENPD program won't be executed, but the name following the dash is stored in _PDSETUP.
If you issue SET PDSETUP TO without cPrinterDriverSetup, the current printer driver setup is cleared, the empty string is stored in _PDSETUP, and the _PDPARMS array is cleared from memory.
- Parameter1[, Parameter2...]
Specifies any number of optional parameters. These parameters are passed to the printer setup interface application and can be of any type (character, numeric, logical, and so on). The first line in your printer setup interface application must be an LPARAMETERS or PARAMETERS statement to accept the parameters passed from SET PDSETUP.
If you are using Genpd.app, don't include these optional parameters. Genpd.app doesn't accept parameters passed from SET PDSETUP, so including them generates an error.
- WITH Parameter3[, Parameter4...]
Creates the special _PDPARMS printer array. Each parameter you specify with Parameter3, Parameter4, and so forth becomes an element in _PDPARMS. The first parameter (Parameter3) is stored to the first element of _PDPARMS, the second parameter (Parameter4) is stored to the second element, and so on. These parameters may be of any type (character, numeric, logical, and the like).
If you are using Genpd.app, any parameters you include are overwritten by the application.
In Visual FoxPro, a printer driver setup is used when you print character-based reports created in FoxPro for MS-DOS.
A printer driver setup consists of a combination of settings, including the printer driver program and information such as page orientation, default font size and font style, margins, and so on. Printer driver setups are stored in your FoxPro for MS-DOS resource file, FoxUser.dbf, and can be created interactively and assigned a name in the Printer Setup Editing dialog box.
A printer driver setup can also be loaded or cleared with the _PDSETUP system variable.
When you issue SET PDSETUP, the current printer setup interface application is executed. The interface application is passed the name of the printer driver setup included in SET PDSETUP. The interface application can also be specified with the _GENPD system variable. The default interface application is Genpd.app, the printer setup interface application included with FoxPro for MS-DOS.