Code Monkey home page Code Monkey logo

document_scanner_flutter's Introduction

document_scanner_flutter pub package

A document scanner + PDF generator plugin for flutter

Getting Started

Installing

document_scanner_flutter: ^0.2.3

Basic Usage

try {
    File scannedDoc = await DocumentScannerFlutter.launch();
    // `scannedDoc` will be the image file scanned from scanner
} on PlatformException {
    // 'Failed to get document path or operation cancelled!';
}

Or With Specific Source (Gallery / Camera)

try {
    File scannedDoc = await DocumentScannerFlutter.launch(source: ScannerFileSource.CAMERA); // Or ScannerFileSource.GALLERY
    // `scannedDoc` will be the image file scanned from scanner
} on PlatformException {
    // 'Failed to get document path or operation cancelled!';
}

New Features! ๐ŸŽŠ๐Ÿฅณ๐Ÿ˜Ž

PDF generation of scanned images

try {
    File scannedDoc = await DocumentScannerFlutter.launchForPdf(source: ScannerFileSource.CAMERA); // Or ScannerFileSource.GALLERY
    // `scannedDoc` will be the PDF file generated from scanner
} on PlatformException {
    // 'Failed to get document path or operation cancelled!';
}

Android Scanner labels customization

try {
    // Other Android Scanner labels customization 
    var androidLabelsConfigs = {
        ScannerConfigsAndroid.ANDROID_NEXT_BUTTON_TITLE : "Next Step",
        ScannerConfigsAndroid.ANDROID_SAVE_BUTTON_TITLE: "Save It",
        ScannerConfigsAndroid.ANDROID_ROTATE_LEFT_TITLE: "Turn it left",
        ScannerConfigsAndroid.ANDROID_ROTATE_RIGHT_TITLE: "Turn it right",
        ScannerConfigsAndroid.ANDROID_ORIGINAL_TITLE: "Original",
        ScannerConfigsAndroid.ANDROID_BMW_TITLE: "B & W"
    } 

    File scannedDoc = await DocumentScannerFlutter.launchForPdf(source: ScannerFileSource.CAMERA,androidConfigs: androidLabelsConfigs); 
    // `scannedDoc` will be the PDF file generated from scanner
} on PlatformException {
    // 'Failed to get document path or operation cancelled!';
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.