NAPS2.Wia
1.0.3
Prefix Reserved
See the version list below for details.
dotnet add package NAPS2.Wia --version 1.0.3
NuGet\Install-Package NAPS2.Wia -Version 1.0.3
<PackageReference Include="NAPS2.Wia" Version="1.0.3" />
paket add NAPS2.Wia --version 1.0.3
#r "nuget: NAPS2.Wia, 1.0.3"
// Install NAPS2.Wia as a Cake Addin #addin nuget:?package=NAPS2.Wia&version=1.0.3 // Install NAPS2.Wia as a Cake Tool #tool nuget:?package=NAPS2.Wia&version=1.0.3
NAPS2.Wia
NAPS2.Wia is a standalone component that acts as a low-level wrapper around Windows Image Acquisition (WIA).
Compared to the COM-based wiaaut.dll, you get:
- WIA 2.0 support
- Better feeder compatibility
- Idiomatic .NET interface
If you're looking for a higher-level and easier-to-use scanning interface, check out NAPS2.Sdk.
Example
using var deviceManager = new WiaDeviceManager();
// Prompt the user to select a scanner
using var device = deviceManager.PromptForDevice();
// Select either "Flatbed" or "Feeder"
using var item = device.FindSubItem("Feeder");
// Scan all pages in the feeder at once
item.SetProperty(WiaPropertyId.IPS_PAGES,
WiaPropertyValue.ALL_PAGES);
// Enable duplex scanning
item.SetProperty(WiaPropertyId.IPS_DOCUMENT_HANDLING_SELECT,
WiaPropertyValue.DUPLEX);
// Set up the scan
using var transfer = item.StartTransfer();
transfer.PageScanned += (sender, args) =>
{
using (args.Stream)
{
var bitmap = new Bitmap(args.Stream);
// Do something with the image
}
};
// Do the actual scan
transfer.Download();
Known issues
- Native acquisition with WIA 1.0 only works in 32-bit processes. NAPS2.Sdk provides a 32-bit worker process that can be used from 64-bit applications. Most users shouldn't be affected since WIA 2.0 has no such issue.
Supported Platforms
- .NET Framework 4.0 (Windows XP+)
- .NET Core 2.0+ (Windows)
- .NET Standard 2.0+ (Windows)
License
Unlike most of NAPS2.Sdk which is licensed under the LGPL, NAPS2.Wia uses the more permissive MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 2.0
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NAPS2.Wia:
Package | Downloads |
---|---|
NAPS2.Sdk
NAPS2.Sdk is a fully-featured scanning library, supporting WIA, TWAIN, SANE, and ESCL scanners on Windows, Mac, and Linux. |
|
Wahid_NAPS2.Sdk
NAPS2.Sdk is a fully-featured scanning library, supporting WIA, TWAIN, SANE, and ESCL scanners on Windows, Mac, and Linux. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on NAPS2.Wia:
Repository | Stars |
---|---|
cyanfish/naps2
Scan documents to PDF and more, as simply as possible.
|