npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@extrieve_technologies/quickcapture_react_native

v0.0.14

Published

A react native port for QuickCapture AI Document scanning SDK with QR & BAR code Generation and scanning

Downloads

21

Readme

quickcapture_react_native

A React Native port of quickcapture for easy integration into mobile applications.

The Quickcapture plugin offers functionalities for capturing documents and optical codes (like QR codes and barcodes), building PDFs from captured images, and generating QR and barcode images from provided data. This document guides you through the installation and utilization of the Quickcapture plugin in your React Native application.

Installation

Follow these steps to install the Quickcapture plugin using either npm or Yarn, depending on your preference:

Using npm

  1. Add the Package:
npm install @extrieve_technologies/quickcapture_react_native
  1. Link the Package: If you are using React Native 0.60 or above, autolinking will handle the rest. For iOS, you must run:
cd ios && pod  install && cd..
  1. Rebuild Your Application:

Rebuild your application to ensure all native dependencies are properly linked. For iOS:

npx react-native run-ios

For Android:

npx react-native run-android

Using Yarn

  1. Add the Package:
yarn add @extrieve_technologies/quickcapture_react_native

Usage

  1. First, import the necessary modules and initialize quickcapture:

    import {
    	//If need to activate the SDK without restrictions - optional
    	activateLicense,
    	//TO initialise license - mandatory
    	initialise,
    	//For Document Capture capabilities, add following - optional
    	captureDocument,
    	buildPdfForLastDocumentCapture,
    	//For Bar/QR Code capabilities, add following - optional
    	captureOpticalCode,
    	generateQRCode,
    	generateBarcode,
    } from  '@extrieve_technologies/quickcapture_react_native';
    
    // Initialize Quickcapture
    //activateLicense('Your Android license key', 'Your iOS license key');
    activateLicense(androidLicense, iosLicense).then((response) => {
    	//response - true/false
    });
    
    //call plugin initialisation
    initialise();
  2. captureDocument : To start capturing images, call startCapture. This function returns a promise that resolves with the JSON string having an array of the captured images file path:

    captureDocument().then((resultString) => {
    	const result = JSON.parse(resultString);
    })
    .catch((error) => {
    	console.error('Error starting capture:', error);
    });
  3. buildPdfForLastDocumentCapture : To build a PDF from the last capture set, use buildPdfForLastCapture. This function also returns a promise that resolves with the path to the generated PDF:

    buildPdfForLastCapture().then(pdfFilePath  => {
    	console.log(`Generated PDF path: ${pdfFilePath}`);
    }).catch(error  => {
    	console.error(`PDF generation error: ${error}`);
    });
  4. captureOpticalCode : To Captures an optical code (QR code or barcode) using the device camera.Will returns a promise that resolves to the scanned code data in JSON string

    captureOpticalCode().then((resultString) => {
    	//handle JSON data here.
    	const  result = JSON.parse(resultString);
    	console.log('Scanned code : ', result.DATA);
    })
    .catch((error) => {
    	console.error('Error Scanning code:', error);
    });
  5. generateQRCode : Generates a QR code from provided data.Need to provide a data in string.in return, a promise that resolves data with Base64 data of the generated QR code image will get.

    generateQRCode(qrText).then((base64String) => {
    	// use barcode image in Base64 data format here.
    	//image encoded and a PNG image in Base64 format
    	//setBase64Image(base64String);
    	Alert.alert('The QR code was generated successfully');
    })
    .catch((error) => {
    	console.error('Error generating QR code:', error);
    	Alert.alert('QR Generation Error', `Error: ${error.message}`);
    });
  6. generateBarcode : Generates a BAR code from provided data.Need to provide a data in string and also can specify if the BARcode with text needed.In return, a promise that resolves data with Base64 data of the generated BAR code image will get.

    generateBarcode(qrText, enableText).then((base64String) => {
    	// use barcode image in Base64 data format here.
    	//image encoded and a PNG image in Base64 format
    	//setBase64Image(base64String);
    	Alert.alert('Barcode generated successfully.');
    })
    .catch((error) => {
    	console.error('Error generating QR code:', error);
    	Alert.alert('QR Generation Error', `Error: ${error.message}`);
    });

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library