New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mdocument-scanner

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdocument-scanner

Mdocument scanner

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

mdocument-scanner

Document scanner - This is a Capacitor plugin that lets you scan documents using Android and iOS.

Install

npm install mdocument-scanner
npx cap sync

Android Configuration

Add these lines to android/app/src/main/res/xml/file_paths.xml

<?xml version="1.0" encoding="utf-8" ?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="external_files" path="."/>
    <cache-path name="mlkit_docscan_ui_client" path="." />
</paths>

iOS Configuration

iOS requires the following usage description be added and filled out for your app in Info.plist:

NSCameraUsageDescription (Privacy - Camera Usage Description)

API

  • scanDocument(...)
  • Interfaces
  • Enums

scanDocument(...)

scanDocument(options: ScanDocumentOptions) => Promise<ScanDocumentResponse>
ParamType
optionsScanDocumentOptions

Returns: Promise<ScanDocumentResponse>

Interfaces

ScanDocumentResponse

PropTypeDescription
scannedFilestringThis is an array with either file path or base64 for the document scan.
statusScanDocumentResponseStatusThe status lets you know if the document scan completes successfully, or if the user cancels before completing the document scan.

ScanDocumentOptions

PropTypeDescriptionDefault
maxNumDocumentsnumberAndroid only: The maximum number of photos an user can take (not counting photo retakes): 1
responseTypeResponseTypeThe response comes back in this format on success. It can be the document scan image file paths or base64 images.: ResponseType.ImageFilePath

Enums

ScanDocumentResponseStatus

MembersValueDescription
Success'success'The status comes back as success if the document scan completes successfully.
Cancel'cancel'The status comes back as cancel if the user closes out of the camera before completing the document scan.

ResponseType

MembersValueDescription
Base64'base64'Use this response type if you want document scan returned as base64 images.
ImageFilePath'imageFilePath'Use this response type if you want document scan returned as inmage file paths.

Keywords

capacitor

FAQs

Package last updated on 15 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts