Gets information about a given printer.
Syntax
Result = SRP_Get_PrinterInfo(PrinterName)
Returns
A dynamic array structure with lots of printer information.
Parameters
| Parameter | Description |
|---|---|
| Option | Determines which printers are to be returned. |
Remarks
The SRP_Get_PrinterInfo method is an OIPI-free way to get information about a single printer. The PrinterName parameter is the name of a printer as it appears in the computer's printer panel. You can also get the printer name by calling SRP_Get_Printers.
This method returns a single dynamic array that contains a wealth of information. Here is the structure:
Array has the following structure:
| Pos | Name | Description |
|---|---|---|
| <1> Printer Information | ||
| <1, 1> | Printer Name | The printer's name |
| <1, 2> | Server Name | The print server name of the printer |
| <1, 3> | Share Name | The shared name of the printer |
| <1, 4> | Port Name | The printer port name |
| <1, 5> | Driver Name | The printer driver name |
| <1, 6> | Description | The printer description |
| <1, 7> | Location | The printer location |
| <1, 8> | Separator File | The printer's page separator file |
| <1, 9> | Print Processor | The printer processor for the printer |
| <1, 10> | Parameters | Auxiliary parameters for the printer |
| <2> Printer Capabilities | ||
| <2, 1> | Device Name | The device name of the printer |
| <2, 2> | Driver Version | The printer's driver version number |
| <2, 3> | Spec Version | The specification version number |
| <2, 4> Paper Orientation | ||
| <2, 4, 1> | Value | The numerical value indicating the paper orientation |
| <2, 4, 2> | Description | The textual description of the paper orientation |
| <2, 5> Paper Size | ||
| <2, 5, 1> | Value | The numerical value indicating the paper size |
| <2, 5, 2> | Description | The textual description of the paper size |
| <2, 6> | Paper Length | Length of paper in tenths of a millimeter |
| <2, 7> | Paper Width | Width of paper in tenths of a millimeter |
| <2, 8> | Scale | The factor by which the printed output is to be scaled. Scale is X where X/100 is the scale factor. |
| <2, 9> | Copies | The default number of copies |
| <2, 10> Default Source | ||
| <2, 10, 1> | Value | The numerical value indicating the paper source |
| <2, 10, 2> | Description | The textual description of the paper source |
| <2, 11> Print Quality | ||
| <2, 11, 1> | Value | The numerical value indicating the print quality |
| <2, 11, 2> | Description | The textual description of the print quality |
| <2, 12> Position | ||
| <2, 12, 1> | X Position | The horizontal position in reference to the primary display device |
| <2, 12, 2> | Y Position | The vertical position in reference to the primary display device |
| <2, 13> Display Rotation | ||
| <2, 13, 1> | Value | The numerical value indicating the display rotation |
| <2, 13, 2> | Description | The textual description of the display rotation |
| <2, 14> Display Layout | ||
| <2, 14, 1> | Value | The numerical value indicating the display layout |
| <2, 14, 2> | Description | The textual description of the display layout |
| <2, 15> Color Mode | ||
| <2, 15, 1> | Value | The numerical value indicating the color mode |
| <2, 15, 2> | Description | The textual description of the color mode |
| <2, 16> Duplex | ||
| <2, 16, 1> | Value | The numerical value indicating the duplex setting |
| <2, 16, 2> | Description | The textual description of the duplex setting |
| <2, 17> | Y Resolution | The y-resolution in dots per inch |
| <2, 18> True Type Font Option | ||
| <2, 18, 1> | Value | The numerical value indicating how true type fonts should be printed |
| <2, 18, 2> | Description | The textual description of how true type fonts should be printed |
| <2, 19> | Collate | Specifies whether collation should be used when printing multiple copies. |
| <2, 20> | Form Name | The name of the form to use. |
| <2, 21> | Logical Pixels | The number of pixels per logical inch. |
| <2, 22> | Bits Per Pixel | The color resolution, in bits per pixel, of the display device. |
| <2, 23> | Device Width in Pixels | The width, in pixels, of the visible device surface |
| <2, 24> | Device Height in Pixels | The height, in pixels, of the visible device surface |
| <2, 25> Media Type | ||
| <2, 25, 1> | Value | The numerical value indicating the type of media being printed on. |
| <2, 25, 2> | Description | The textual description of the type of media being printed on. |
| <2, 26> Dither Type | ||
| <2, 26, 1> | Value | The numerical value indicating how dithering is to be done. |
| <2, 26, 2> | Description | The textual description of how dithering is to be done. |
Example
// Determine if the default printer is set to print on Letter size paper
DefaultPrinter = SRP_Get_Printers("Default")
Info = SRP_Get_PrinterInfo(DefaultPrinter)
IsLetter = IndexC(Info<2, 5, 2>, "Letter", 1) GT 0