## Using Your DDK

[prev][next][parent][TOC]

### 32-Bit PostScript Device Support

PPD Compiler

A PostScript Printer Description (PPD) file is parsed to binary data before it is used by the driver. The binary data, or PostScript Printer Binary ( PPB), is converted using the OS/2 PPD compiler. The compiler, named PPD2BIN .EXE, is created when the 32-bit PostScript printer driver is built.

Notes:

1.The PPD compiler currently supports a maximum of 256 PPD files. If that number is exceeded, you must increment the value of the macro MAX_INPUT, located in PPDIALOG.H.

2.To add a new device, the files to the 16-bit driver must be in the DDK\ PRINT\MRI\EN\OSDD\PSCRIPT directory because the makefile copies some files from this path. If you do not have access to the 16-bit code, remove any text from the makefile that refers to 16-bit.

Adding New Devices

The following procedure describes how to add a new device to the driver. Throughout the instruction, the PPD file for the IBM PS-100 printer will be used as an example.

Note: The IBM PS-100 is not a real printer. It is used only as an example.

To add a new device to the driver:

1.Obtain the PPD file of the device.

The PPD file is necessary for the driver to support a specific device. PPD files are available from the device manufacturer.

The PPD file name of this example is:

        IBMPS100.PPD

2.Browse the PPD file, searching for the device name.

The device name is the string that follows the PPD key *NickName:. It is usually found near the top of the PPD file.

The nickname of the printer in this example is:

        IBM PS-100

3.Write your PPD file name and nickname on a piece of paper. You will need to refer to it later.

4.Copy the PPD file to the DDK\PRINT\MRI\EN\OSDD\PSCRIPT\PPD directory.

5.Go to the DDK\PRINT\SRC\OSDD\PSCRIPT\POST32\PPD directory.

6.Edit the file PPDFILE.LST.

PPDFILE.LST contains the list of PPD files that are to be compiled. The PPD file names in PDDFILE.LST are listed in alphabetical order. Each line in PPDFILE.LST represents a PPD file in the following format:

        [file name]   ;  *NickName: "[nickname]"

where:

[file name] is the PPD file name (of the file you received from the manufacturer).
[nickname] is the nickname you copied from the PPD file.

7.Add a new line to PPDFILE.LST (in the proper alphabetic sequence) for your PPD file, following the format shown above.

In this example, the printer would be added as follows:

        IBMPS100.PPD  ;  *NickName: "IBM PS-100"

8.Save and exit PPDFILE.LST.

9.Go to the DDK\PRINT\SRC\OSDD\PSCRIPT\POST32 directory.

10.Edit the makefile.

The makefile contains a list of macros from PPD01 to PPD25 in the following format:

        PPD[##] = $(PPD)\[PPD file name]

$(PPD)\ defines the path of the file location.

Immediately following the macro list is a macro called PPDS. PPDS lists all the file macros.

     PPDS = $(PPD01) $(PPD02) $(PPD03) $(PPD04) $(PPD05) $(PPD06) $(PPD07)   \
            $(PPD08) $(PPD09) $(PPD10) $(PPD11) $(PPD12) $(PPD13) $(PPD14)   \
            $(PPD15) $(PPD16) $(PPD17) $(PPD18) $(PPD19) $(PPD20) $(PPD21)   \
            $(PPD22) $(PPD23) $(PPD24) $(PPD25)

11.Add a new PPD number and your PPD file name to the bottom of the macro list.

In this example, the printer would be entered as follows:

    PPD99 = $(PPD)\IBMPS100.PPD

12.Add your new PPD number to the end of the PPDS macro. If you use more than one line for a macro, add a backslash at the end of the previous line.

In this example, the printer would be entered as follows:

     PPDS = $(PPD01) $(PPD02) $(PPD03) $(PPD04) $(PPD05) $(PPD06) $(PPD07)   \
            $(PPD08) $(PPD09) $(PPD10) $(PPD11) $(PPD12) $(PPD13) $(PPD14)   \
            $(PPD15) $(PPD16) $(PPD17) $(PPD18) $(PPD19) $(PPD20) $(PPD21)   \
            $(PPD22) $(PPD23) $(PPD24) $(PPD25) $(PPD99)

13.Save and exit the makefile.

14.Start the compiler by typing:

        NMAKE ALL

The PPD file will be converted to a PPB and added as a resource on the driver.

15.After the compilation is completed, copy PSCRIPT.LST to the DDK\PRINT\ MRI\EN\OSDD\PSCRIPT\POST32 directory.

16.Go to this directory.

17.To install the new resource, select Other OS/2 printer driver in the Printer Install dialog box and provide the path where the driver is located . Your new printer will be displayed in the list.

Note: If the system asks you if you want to replace the printer driver with a new version and you do not know what to select, select yes.