GetPrinterCapabilities
Rendering and printing
Description
Queries a live Windows printer-driver snapshot without starting a print job or displaying a print dialog
The returned record includes paper IDs, names and millimetre dimensions, input-bin IDs and names, duplex, colour, landscape and collation support, the driver port and maximum copy count
A driver may omit paper or bin metadata while still reporting its other capabilities; in that case the corresponding array is empty and the method still succeeds
Syntax
Delphi
Function TPDFlib.GetPrinterCapabilities(Const PrinterName: WideString; Out Capabilities: TPDFlibPrinterCapabilities): Integer;Parameters
| PrinterName | An installed printer name returned by GetPrinterNames or a custom-printer handle returned by NewCustomPrinter |
|---|---|
| Capabilities | Receives a fully replaced snapshot; invalid names clear every field |
Return values
| 0 | The name is invalid or the driver could not be opened |
|---|---|
| 1 | The base driver capabilities were queried; paper or bin arrays may still be empty |