NAPS2 SDK - Scanning SDK for .NET

Scan documents to PDF and more, as simply as possible.

// Set up
using var scanningContext = new ScanningContext(new GdiImageContext());
var controller = new ScanController(scanningContext);

// Query for available scanning devices
var devices = await controller.GetDeviceList();

// Set scanning options
var options = new ScanOptions
    Device = devices.First(),
    PaperSource = PaperSource.Feeder,
    PageSize = PageSize.A4,
    Dpi = 300

// Scan and save images
int i = 1;
await foreach (var image in controller.Scan(options))

// Scan and save PDF
var images = await controller.Scan(options).ToListAsync();
var pdfExporter = new PdfExporter(scanningContext);
await pdfExporter.Export("doc.pdf", images);

NAPS2 SDK is a free and open source scanning library for C#/.NET.

Scan with devices from Canon, Brother, HP, Epson, Fujitsu, and more. Then save to PDF, TIFF, JPEG, or PNG.


  • WIA, TWAIN, SANE, and ESCL drivers
  • PDF import/export and OCR
  • Share scanners on the local network
  • Modern .NET 6+ API
  • Windows, Mac, and Linux support