## Printer Device Driver

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

### General Tips

You can set the driver to send the job to a file rather than to the printer. (One reason to do this is to save paper.)

The driver is loaded in memory at the first job and remains in memory until the system is restarted. While loaded, PSCRIPT.DRV cannot be modified or deleted. If the driver is not currently loaded, however, accessing Printer Properties or Job Properties will not load the driver. Therefore, the driver can still be modified or deleted if either dialog box has been previously opened.

If there is a trap while using the Job Properties dialog box, it is better to open the Job Properties dialog box from an application rather than from the Printer Object. This will cause the application to terminate rather than the Workplace Shell.

The driver does not process "raw" PostScript jobs. The driver receives the job and passes it directly to the device through DEVESC_RAWDATA.

The PostScript driver only handles OS/2 and, in some cases, WIN-OS/2* jobs . For the driver to support WIN-OS/2, the port setting in the WIN-OS/2 session must be set to the port name with ".OS2" appended (for example, " LPT1.OS2"). In WIN-OS/2, all other port settings will cause the job to be handled by a Windows-compatible driver. OS/2-DOS uses standard DOS drivers and is completely ignored by this driver.

To make debugging easier, you can compile the source code (no linking necessary) using the "/Fa+" option. This will generate the source code with matching assembler code, which will virtually match the assembler output on the debugger.

If a job contains any invalid characters, with the exception of the last character (ASCII 4, the diamond character), or the first line (the first line might contain characters that set the device in PostScript mode), the device will end the job. For more information about valid and invalid characters, refer to a PostScript manual. Even with little knowledge of the PostScript language, it is usually not difficult to identify invalid characters in a job.

The compiler can produce a file that contains both the source and matching assembler code. These files contain the extension ".OUT". To generate such a file, type:

    NMAKE ALL COD=1

Any C source file that is compiled will generate a matching file that contains both C and assembler.