## Printer Device Driver

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

### Printing and Queues

The use of print objects (queues) offers the most flexibility to users printing Presentation Manager applications under OS/2.

For example, although a user may have only one printer and one port, two print objects can be created under OS/2, each with a separate set of job and printer properties. One queue could be created for portrait printing and the other for landscape printing. The user can name the queues "My Printer Portrait" and "My Printer Landscape". From an application, the user will see both queues as possible output destinations. Simple dynamic switching between portrait or landscape printing can be achieved by selecting the queue that will produce the desired orientation.

Because of print queues, the user need not change job properties or change hardware switches on the printer to change printing orientation.

The Font Test function FillQueNameListBox(), located in FT32HELP.C, shows one method of enumerating and displaying all local and network OS/2 print objects (queues).

Note: The queue description displayed under each print object can be changed by the user. The update will not be reflected in pszComment field of the PRQINFO structure, but the actual queue name (pszName) in the structure will always remain the same. Therefore, from invocation to invocation, applications should store and reference the real name instead of the comment name.

When a queue is selected, an application must retrieve information about the target printer driver prior to printing or querying device capabilities .

The Font Test function GetQueueData() shows how this data is retrieved as soon as a print object name has been selected by a user. If the user has not selected a specific queue or if a print object is not found, the queue data for the system default print object is retrieved in the function GetDefaultQueueData().

Note: Only one system default print object (queue) exists.