TdxPrintDevice.Printers Property
Stores names of all printer devices available in the operating system.
Declaration
property Printers: TStrings read;
Property Value
Type | Description |
---|---|
TStrings | Provides indexed access to names of all available printer devices. Use the PrinterCount or |
Remarks
Use the Printers
property to obtain names of available printers.
Code Example
The following code example sets Microsoft XPS Document Writer as the active printer device for TdxComponentPrinter:
uses
dxPrnDev; // This unit declares the dxPrintDevice function
// ...
var
I: Integer;
begin
for I := 0 to dxPrintDevice.PrinterCount - 1 do
begin
if dxPrintDevice.Printers.Strings[I] = 'Microsoft XPS Document Writer' then
begin
dxPrintDevice.PrinterIndex := I; // Changes the active printer device
break;
end;
end;
end;
See Also