This property sets the size of the paper. This property is only enabled when using a custom-built user interface (UserInterface=Suppress).

[Visual Basic] Public WriteOnly Property PaperSize As Newtone.ImageKit.WPF.ScanPaperSize
[C#] public Newtone.ImageKit.WPF.ScanPaperSize PaperSize {set;}

Property Value

This value is of typeScanPaperSize

Explanation

The PaperSize property sets the size of the paper. This property is enabled when the UserInterface property is Suppress. However this property is disabled when using a digital camera. To enable the Rect property, set the PaperSize property to UserSize or a negative value.

Depending on the datasource (scan driver), using a user defined paper size (UserSize) and setting the scan area, may still result in a start position of the scan being incorrect. If that is the case, please use one of the above constant values listed in the ScanPaperSize enum (1 or more) for the paper size and set this to a NEGATIVE value. (Please refer to the example code below).

Note: Please set the PaperSize property to a size supported by the datasource (scan driver) or set it to the largest supported paper size. With some datasources the PaperSize property has no effect. Please refer to the scan manufacturer for details.

The possible PaperSize settings supported by a scan device can be retrieved using the GetCapabilityEnumToSingle method. For scan devices that only support a fixed paper size or do not support paper size settings set this property to UserSize.

When PaperSize is set to "UndefinedSize" (1000), the paper size is automatically detected then the document is scanned, however, with scanners that can only detect one dimension (either height or width) there are cases when the automatic detection does not work properly. Also if scanning problems occur when theTransfer property is set to Memory, change the Transfer property setting to Native. To find out if "UndefinedSize" paper size is supported by the datasource, please execute the IsCapabilitySupported method.

If undefined paper size is supported and you have set UndefineSize into the PaperSize property but the auto detection of the paper's size isn't correct, you can try the following:
Set the BorderDetection property to true. If this still doesn't work and you are using a PFU scan driver then try the next step.
Add the largest possible paper size to the end of the UndefinedSize setting in the PaperSize property. For example, if the largest size you can set for the scanner is A3 then set
PaperSize = ScanPaperSize.UndefinedSize + 11. (See ScanPaperSize enum for those values)

Example

( The PaperSize is set to UserSize and the scan area is set but the scan position is wrong )

[Visual Basic.NET]
ImageKit1.Scan.UserInterface = ScanUserInterface.Suppress
ImageKit1.Scan.Unit = ScanUnit.Inch
ImageKit1.Scan.PaperSize = ScanPaperSize.UserSize
ImageKit1.Scan.Rect = new RectangleF(0, 0, CSng(6.9), CSng(10.2))

[Visual C#.NET]
imageKit1.Scan.UserInterface = ScanUserInterface.Suppress;
imageKit1.Scan.Unit = ScanUnit.Inch;
imageKit1.Scan.PaperSize = ScanPaperSize.UserSize;
imageKit1.Scan.Rect = new RectangleF(0, 0, (float)6.9, (float)10.2);

( The PaperSize is set to one of the above constants with a NEGATIVE value --> the scan position is correct)

[Visual Basic.NET]
ImageKit1.Scan.UserInterface = ScanUserInterface.Suppress
ImageKit1.Scan.Unit = ScanUnit.Inch
ImageKit1.Scan.PaperSize = -3 ' US Letter size
ImageKit1.Scan.Rect = new RectangleF(0, 0, CSng(6.9), CSng(10.2))

[Visual C#.NET]
imageKit1.Scan.UserInterface = ScanUserInterface.Suppress;
imageKit1.Scan.Unit = ScanUnit.Inch;
imageKit1.Scan.PaperSize = (ScanPaperSize)(-3); // US Letter size
imageKit1.Scan.Rect = new RectangleF(0, 0, (float)6.9, (float)10.2);

See Also

Scan Members | Newtone.ImageKit.Wpf.ImageKit

The ImageKit WPF is created by Newtone Corporation