## Printer Device Driver

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

### Handling Job Properties

Job properties are unique settings that tell an OS/2 printer driver how to format a print job. The job properties are not directly manipulated by an application because the format of job property data varies among print drivers (and devices within drivers).

Managing job properties from an application should begin with the print object. Knowing what print object a user intends to use for printing allows a developer to retrieve the job properties that have already been selected by the user for that print object (queue). Using these job properties as a starting point, the application can call the DevPostdeviceModes(); to cause the printer driver to display its unique job property panels. The queues' job property data can be passed into this call so that the panels resemble what would be seen from the queue.

Assuming that the user probably wants to use these settings whenever the application prints, the application can be written in such a way as to store these job properties in an INI file upon returning from the call to DevPostdeviceModes();.

The Font Test functions GetQueueData() and AccessDevice(); show how these job property manipulations are handled.

Notes:

1.Job property data is significant both for printing to and querying information from an OS/2 printer driver. Therefore, the job property data that will be used for printing should be passed in even on queries to an OS /2 driver. This information can help the printer driver provide the most accurate answers to an application's query.

2.Applications should never call DevPostDeviceModes() to display or alter Printer Properties because the changes affected by such a call are system wide and could alter another applications behavior. Only Print object should call DevPostDeviceModes().