This method retrieves the largest physical size that can be scanned with a given scan device.

[Visual Basic] Public Function GetPhysicalSize() As SizeF Public Function GetPhysicalSize(ByVal dpiX As Integer, ByVal dpiY As Integer) As SizeF
[C#] public SizeF GetPhysicalSize(); public SizeF GetPhysicalSize(int dpiX, int dpiY);

Parameters

dpiX
Horizontal Resolution (in dots per inch)
dpiY
Vertical Resolution (in dots per inch)

Return Value

The largest physical size (if unsuccessful, the Width and Height properties of the SizeF structure returns 0)

Explanation

The GetPhysicalSize method retrieves the largest physical size that can be scanned with a given scan device. To retrieve the largest physical size the DataSourceName, Mode, and Unit properties must be set. If the DataSourceName property is blank then prior to executing this method, please execute the SelectDataSource method. (If the OpenDataSource method has been executed, the DataSourceName is disabled and the open scan device will be used.) Set the Mode property from 0 to 2 and set the Unit to values supported by the datasource (scan device). The Width and Height parameters of the SizeF structure will return values depending on the Mode and Unit properties. If Unit is set to Pixel and no parameter is passed then the current resolution (dpi) will be used. 

To execute the GetPhysicalSize method you must first execute the Initialize method. If the OpenDataSource method is executed prior to executing the GetPhysicalSize method then the open datasource cannot be used by another application until that datasource (scan device) is closed.

See Also

Scan Class | Scan Members

The ImageKit.NET3 is created by Newtone Corporation