Table of Contents

Class ScanOptions

Namespace
NAPS2.Scan
Assembly
NAPS2.Sdk.dll

Represents the options used for scanning.

public class ScanOptions
Inheritance
ScanOptions

Fields

DEFAULT_QUALITY

public const int DEFAULT_QUALITY

Field Value

int

Properties

AutoDeskew

Whether scanned images should go through automatic deskewing to straighten pages that are at a slight angle.

public bool AutoDeskew { get; set; }

Property Value

bool

BarcodeDetectionOptions

Options for detecting barcodes during the scan.

public BarcodeDetectionOptions BarcodeDetectionOptions { get; set; }

Property Value

BarcodeDetectionOptions

BitDepth

public BitDepth BitDepth { get; set; }

Property Value

BitDepth

BlankPageCoverageThreshold

public int BlankPageCoverageThreshold { get; set; }

Property Value

int

BlankPageWhiteThreshold

public int BlankPageWhiteThreshold { get; set; }

Property Value

int

Brightness

A brightness adjustment to be used for the scan, in the range -1000 (all black) to +1000 (all white).

public int Brightness { get; set; }

Property Value

int

BrightnessContrastAfterScan

public bool BrightnessContrastAfterScan { get; set; }

Property Value

bool

Contrast

A contrast adjustment to be used for the scan, in the range -1000 (no contrast) to +1000 (max contrast).

public int Contrast { get; set; }

Property Value

int

CropToPageSize

public bool CropToPageSize { get; set; }

Property Value

bool

Device

The physical device to scan with.

public ScanDevice? Device { get; set; }

Property Value

ScanDevice

DialogParent

public IntPtr DialogParent { get; set; }

Property Value

IntPtr

Dpi

The resolution to scan with, in dots-per-inch (DPI). Typical values include 100, 300, 600, 1200.

public int Dpi { get; set; }

Property Value

int

Driver

The driver type used for scanning. Supported drivers depend on the platform (Windows/Mac/Linux). This usually doesn't need to be set as it can be determined from the Device property.

public Driver Driver { get; set; }

Property Value

Driver

EsclOptions

Options specific to the ESCL driver.

public EsclOptions EsclOptions { get; set; }

Property Value

EsclOptions

ExcludeBlankPages

public bool ExcludeBlankPages { get; set; }

Property Value

bool

ExcludeLocalIPs

When querying devices, ignore networked devices that are at the same IP as the current computer (so that devices shared with ScanServer aren't given duplicate entries).

public bool ExcludeLocalIPs { get; set; }

Property Value

bool

FlipDuplexedPages

Compatibility option to correct problems with some scanners. If this is true and the PaperSource is Duplex, even-numbered pages are flipped vertically.

public bool FlipDuplexedPages { get; set; }

Property Value

bool

KeyValueOptions

public KeyValueScanOptions? KeyValueOptions { get; set; }

Property Value

KeyValueScanOptions

MaxQuality

Whether scanned images should be stored using maximum (lossless) quality. Otherwise images are generally stored using JPEG compression.

public bool MaxQuality { get; set; }

Property Value

bool

OcrParams

public OcrParams OcrParams { get; set; }

Property Value

OcrParams

OcrPriority

public OcrPriority OcrPriority { get; set; }

Property Value

OcrPriority

PageAlign

public HorizontalAlign PageAlign { get; set; }

Property Value

HorizontalAlign

PageSize

The size of the page to be scanned.

public PageSize? PageSize { get; set; }

Property Value

PageSize?

PaperSource

For scanners with multiple ways to scan (flatbed/feeder/duplex), specifies which source to use.

public PaperSource PaperSource { get; set; }

Property Value

PaperSource

Quality

The JPEG compression quality used for storing images. Ignored if MaxQuality is true.

public int Quality { get; set; }

Property Value

int

RotateDegrees

A fixed number of degrees to rotate each scanned page clockwise. If AutoDeskew is true, the fixed rotation happens first.

public double RotateDegrees { get; set; }

Property Value

double

SaneOptions

Options specific to the SANE driver.

public SaneOptions SaneOptions { get; set; }

Property Value

SaneOptions

ScaleRatio

A factor used to shrink the scanned image. A factor of 2 means to shrink the image by 2x.

public int ScaleRatio { get; set; }

Property Value

int

StretchToPageSize

public bool StretchToPageSize { get; set; }

Property Value

bool

ThumbnailSize

If non-null, generates thumbnails of the specified size and provides them in the PostProcessingData of each scanned image.

public int? ThumbnailSize { get; set; }

Property Value

int?

TwainOptions

Options specific to the TWAIN driver.

public TwainOptions TwainOptions { get; set; }

Property Value

TwainOptions

UseNativeUI

public bool UseNativeUI { get; set; }

Property Value

bool

WiaOptions

Options specific to the WIA driver.

public WiaOptions WiaOptions { get; set; }

Property Value

WiaOptions

Methods

Clone()

public ScanOptions Clone()

Returns

ScanOptions