This method retrieves the paper size and specified printing area from the printer device context. This method is recommended when using scripting or other languages that require variant types.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.PrintDraw.GetPaperSizeVariant(hDC As Long, left As Variant, top As Variant, right As Variant, bottom As Variant, Width As Variant, Height As Variant, UnitMode As DeviceUnitModeConstants)

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)

In Visual Basic the following constants can be used: (ikPrinterPixel = 0, ikPrinterMM = 1).

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The GetPaperSizeVariant method retrieves the paper size and specified printing area from the printer device context. This method is recommended when using scripting or other languages that require variant types. 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.

Also see the GetPaperSize method.

 

The ImageKit8 ActiveX is a product created by Newtone Corporation