Plugin.Maui.DocumentScanner 0.1.0

dotnet add package Plugin.Maui.DocumentScanner --version 0.1.0
                    
NuGet\Install-Package Plugin.Maui.DocumentScanner -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.Maui.DocumentScanner" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Maui.DocumentScanner" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Maui.DocumentScanner" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.Maui.DocumentScanner --version 0.1.0
                    
#r "nuget: Plugin.Maui.DocumentScanner, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plugin.Maui.DocumentScanner@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plugin.Maui.DocumentScanner&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Maui.DocumentScanner&version=0.1.0
                    
Install as a Cake Tool

Plugin.Maui.DocumentScanner

Native document scanning for .NET MAUI — no paid SDK required.

  • Android: ML Kit document scanner (full scanner UI, auto-crop, filters; models downloaded via Google Play services)
  • iOS: VisionKit document camera for scanning, plus Vision document segmentation with a built-in corner editor for cropping already-taken photos

Supports Android API 23+ (with Google Play services) and iOS 15+.

Setup

Install the package, then register it in MauiProgram.cs:

builder
    .UseMauiApp<App>()
    .UseDocumentScanner();

UseDocumentScanner() registers IDocumentScanner in dependency injection and hooks the Android activity-result plumbing — no MainActivity changes needed.

Usage

Inject IDocumentScanner (or use DocumentScanner.Default without DI):

// Camera scan — returns file paths of cropped pages, empty list on cancel
IReadOnlyList<string> pages = await scanner.ScanAsync();

// Crop already-taken photos from the photo library
IReadOnlyList<string> pages = await scanner.ScanFromPhotosAsync();

// With options
var pages = await scanner.ScanAsync(new DocumentScanOptions
{
    PageLimit = 3,
    Mode = DocumentScannerMode.Base, // Android only: Full, BaseWithFilter, or Base
});

Check scanner.IsSupported first; ScanAsync throws NotSupportedException on devices without a scanner implementation.

Returned files are JPEGs written to the app's cache directory — move or copy them if you need them to persist.

Platform notes

Android iOS
ScanAsync ML Kit scanner UI VisionKit document camera
ScanFromPhotosAsync ML Kit scanner with gallery import Photo picker + auto-detected corners + manual corner editor
PageLimit Applies to both methods Photo import only (VisionKit has no limit)
Mode Full / BaseWithFilter / Base Ignored

Sample

The samples/ScanTest app exercises both scan paths and shows page sizes and timings.

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible.  net10.0-ios26.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 61 8/24/2026