@capgo/capacitor-document-scanner 8.4.6 → 8.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
# @capgo/capacitor-document-scanner
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Scan paper documents with the native scanner UI: VisionKit on iOS and Google ML Kit on Android find the page edges, fix the perspective and return clean images. Add receipt, ID or contract capture to your app without building a camera screen.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_document_scanner"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-document-scanner" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
3
6
|
|
|
4
7
|
<div align="center">
|
|
5
|
-
<
|
|
6
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_document_scanner">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_document_scanner">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
7
12
|
</div>
|
|
8
|
-
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-document-scanner/main/.github/assets/readme-demo.webp" alt="Example app on iOS scanning a handwritten page: the scanner finds the page edges and the scanned image appears in the app" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **Native scanner UI**: `scanDocument()` opens the VisionKit document camera on iOS and the ML Kit document scanner on Android, with automatic edge detection and perspective correction.
|
|
21
|
+
- **Multi-page scans**: capture up to 24 pages in one session, or pass `maxNumDocuments: 1` for single-page mode.
|
|
22
|
+
- **Crop and review**: `letUserAdjustCrop` lets users fix the detected crop, and `reviewCapturedDocument` shows each page before the next capture.
|
|
23
|
+
- **Image cleanup**: tune `brightness` and `contrast` on both platforms. On Android, `scannerMode` adds filters and ML cleaning that removes stains and fingers.
|
|
24
|
+
- **Flexible output**: get file paths or base64 strings with `responseType`, plus a `success` or `cancel` status.
|
|
25
|
+
- **Platforms**: iOS and Android. Web is not supported: `scanDocument()` rejects as unimplemented.
|
|
9
26
|
|
|
10
27
|
## Documentation
|
|
11
28
|
|
|
@@ -3,7 +3,7 @@ import Foundation
|
|
|
3
3
|
|
|
4
4
|
@objc(DocumentScannerPlugin)
|
|
5
5
|
public class DocumentScannerPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
6
|
-
private let pluginVersion: String = "8.4.
|
|
6
|
+
private let pluginVersion: String = "8.4.7"
|
|
7
7
|
public let identifier = "DocumentScannerPlugin"
|
|
8
8
|
public let jsName = "DocumentScanner"
|
|
9
9
|
public let pluginMethods: [CAPPluginMethod] = [
|