This method retrieves the paper size and specified printing area from the printer device context.
* ImageKit10ALib refers to the ANSI version, ImageKit10Lib refers to the Unicode version, (x86) refers to the 32 bit version, and (x64) refers to the 64 bit version.
Parameters
Name | Explanation |
---|---|
hDC | Printer device context |
left,top | Retrieves the location of the top left corner of the specified printing area |
right,bottom | Retrieves the location of the bottom right corner of the specified printing area |
Width | Retrieves the width of the paper |
Height | Retrieves the height of the paper |
UnitMode | The units of measure of the retrieved values (0: pixels, 1: 0.1mm) |
The following constants can be used: (ikPrinterPixel = 0, ikPrinterMM = 1).
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The GetPaperSize method retrieves the paper size and specified printing area from the printer device context. When the UnitMode parameter is 0, the left, top, right, bottom,Width, and Height parameters will be in pixel units. When the UnitMode parameter is 1, the left, top, right, bottom,Width, and Height parameters will be in 0.1mm units.
For scripting languages, other programs that require variant types, or when using 64 bit builds in VB.NET or C#, please refer to the GetPaperSizeVariant method.
Differences between the ImageKit7/8
The hDC argument type has changed.