getdeviceinfo NAME=<s_array>, CURRENT=<s_array>
Function
Query information about the currently selected printer returning information such as such as format size, orientation, scale and supported formats. This command is used in conjunction with LISTDEVICE and SETUPDEVICE commands.
Parameters
|
name=<s_array> |
The returned string contains information about the currently selected print device names. |
|
current=<s-array> |
The string array returns, separated by commas, various pieces of information relating to format size, orientation, scale, etc. FORMAT papersize i.e. letter, A4, etc. SIZE_X After version 12.5.4 GETDEVICEINFO has been extended VERTSIZE vertical size (in mm) PHYSICALOFFSETX/LOGPIXELSX left margin (in inches) PHYSICALOFFSETY/LOGPIXELSY top margin (in inches)
GETDEVICEINFO name=devs[1],CURRENT=data[1] |
Examples
GETDEVICEINFO name=devs[1],CURRENT=data[1]
DECODE data[1]:s1,s2,s3,s4,s5
tell name
tell 'FORMAT=',s1
tell 'SIZE=',s2,'x',s3
tell 'ORIENTATION=',s4
So for example get the selected printer's supported format sizes:
GETDEVICEINFO name=devs[1],SIZE=formats[1]
GETDEVICEINFO can use the DECODE_SEPARATOR to encode the returned values. This variable is read at runtime.
See also