XPRINT GET TRAYS statement

Purpose | Retrieves a list of supported paper trays.
Syntax | XPRINT GET TRAYS TO TrayVar$ Function Form: TrayVar$ = XPRINT$(TRAYS)

Remarks

XPRINT GET TRAYS retrieves a string which contains a list of all of the paper trays supported by the attached host printer. This string is assigned to the string variable specified by TrayVar$.

The string contains a comma-delimited list of traytype, trayname... repeated as many times as necessary. For example:

"1,Upper,2,Lower,5,Envelope"

You can use PARSECOUNT to determine the number of delimited fields in the string, and PARSE$() to easily extract the tray numbers and names. The following equates are predefined in the compiler, and represent the most common trays:

%DMBIN_UPPER = 1

%DMBIN_LOWER = 2

%DMBIN_MIDDLE = 3

%DMBIN_MANUAL = 4

%DMBIN_ENVELOPE = 5

%DMBIN_ENVMANUAL = 6

%DMBIN_AUTO = 7

%DMBIN_TRACTOR = 8

%DMBIN_SMALLFMT = 9

%DMBIN_LARGEFMT = 10

%DMBIN_LARGECAPACITY = 11

%DMBIN_CASSETTE = 14

%DMBIN_FORMSOURCE = 15

Other paper style codes may be defined by Windows or printer suppliers. If executed without a host printer attached, error 57 is generated.

See also | XPRINT ATTACH, XPRINT GET TRAY, XPRINT SET TRAY