Stores information about the supported paper sizes into an array.

APaperSizes(cArrayName, cPrinter, cPort [, nUnit])

Parameters

cArrayName
On return the array contains the following information.
ColumnContentDatatype
1Paper ID - see documentation for the dmPaperSize member of the DEVMODE structureN
2NameC
3Width of the papersize in the requested unitN
4Length of the papersize in the requested unitN
cPrinter

Name of the printer for which to enumerate the paper sizes.

cPort

Name of the port to which the printer is connected.

nUnit (optional)

default = PAPERSIZE_UNIT_MM

Controls the unit of measurement in which the width and length of papersizes is stored into the array.

Possible values for this parameter.
UnitDescription
PAPERSIZE_UNIT_MMTenths of a millimeter
PAPERSIZE_UNIT_INCHInches
PAPERSIZE_UNIT_POINTPoints

Return Value

The number of papersizes.

See Also

Reference

APrinterForms
APrintersEx
APrinterTrays
APrintJobs

Used WinApi functions

DeviceCapabilities with parameter DC_PAPERS, DC_PAPERNAMES and DC_PAPERSIZE