Printer management


package require twapi
enumerate_printers ?-proximity PROXIMITY?
printer_properties_dialog PRINTERNAME ?options?


This module provides commands related to Windows printer management.

Printer Management

The command enumerate_printers returns all the printers on the system. The command get_default_printer returns the name of the default printer.

The command printer_properties_dialog displays the shell property sheet dialog for a printer.


enumerate_printers ?-proximity PROXIMITY?
Returns information about the printers on the system. The data is returned as a list of sublists. Each sublist corresponds to a printer and is a keyed list with the following fields:
name The following value is the name of the printer.
server The following value is the server on which the printer resides.
attrs The following value is a list of attributes for the printer. This is a list of zero or more symbols from the following list: queued, direct, default, shared, network, hidden, local, enabledevq, keepprintedjobs, docompletefirst, workoffline, enablebidi, rawonly, published, fax, ts. Refer to the Windows SDK documentation for the meaning of these attributes.
PROXIMITY may be one of all (default), local or remote depending on whether all printers, local printers or remote printers are to be included in the returned list.
Returns the name of the default printer.
printer_properties_dialog PRINTERNAME ?options?
Displays the shell property dialog for the specified printer. The following options may be specified:
-hwin HWIN If specified, HWIN is the handle to the window to be used as the parent for the dialog.


Copyright © 2006-2009 Ashok P. Nadkarni

Tcl Windows API 3.1.17 Privacy policy