@kodista/document-scanner
Scan documents using the ios Visions framework to correct perspective and do OCR.
| Maintainer | GitHub | Social |
|---|---|---|
| Roman | rspy | not social ;-) |
npm install https://github.com/kodista/document-scanner.git#release/0.0.1
npx cap syncFor iOS you need to set a usage description in your info.plist file.
This can be done by either adding it to the Source Code directly or by using Xcode Property List inspector.
Adding it to the source code directly
- Open up the Info.plist (in Xcode right-click > Open As > Source Code)
- With
<dict></dict>change the following
<dict>
+ <key>NSCameraUsageDescription</key>
+ <string>To be able to scan documents</string>
</dict>NOTE: "To be able to scan documents" can be substituted for anything you like.
Adding it by using Xcode Property List inspector
- Open up the Info.plist in Xcode (right-click > Open As > Property List)
- Next to "Information Property List" click on the tiny
+button. - Under
key, type "Privacy - Camera Usage Description" - Under
value, type "To be able to scan documents"
NOTE: "To be able to scan documents" can be substituted for anything you like.
More info here: https://developer.apple.com/documentation/bundleresources/information_property_list/nscamerausagedescription
const scanResult: ScanResult = await Plugins.DocumentScanner.scan({
resultType: 'uri',
textRecognitionLanguages: ['de-CH', 'en-US']
} as ScanOptions);