This method retrieves the paper size and specified printing area from the printer device context.
[TVIkDeviceUnitMode Type]
Unit
ImageKit
type
TVIkDeviceUnitMode =
(vikPrinterPixel, vikPrinterMM);
Parameters
Name | Explanation |
---|---|
DC | Printer device context |
ALeft, ATop | Retrieves the location of the top left corner of the specified printing area |
ARight, ABottom | Retrieves the location of the bottom right corner of the specified printing area |
ARect | The x, y coordinates of the rectangle |
AWidth | Retrieves the width of the paper |
AHeight | Retrieves the height of the paper |
UnitMode | The units of measure of the retrieved values (vikPrinterPixel: pixels, vikPrinterMM: 0.1mm) |
Use either ALeft, ATop, ARight, ABottom or ARect.
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The GetPaperSize method retrieves the paper size and specified printing area from the printer device context. When the UnitMode parameter is vikPrinterPixel, the ALeft, ATop, ARight, ABottom, AWidth, and AHeight parameters will be in pixel units. When the UnitMode parameter is vikPrinterMM, the ALeft, ATop, ARight, ABottom, AWidth, and AHeight parameters will be in 0.1mm units.
Differences between the ImageKit7/8/9
In VCL the constants contain a "v". In ActiveX, the constants
are: ikPrinterPixel, ikPrinterMM
Methods that pass a TRect type have been added.