JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 34
  • Score
    100M100P100Q83246F
  • License MIT

A React component library for document scanning, editing, and processing with OpenCV, Tesseract OCR, soft crop, and scanner settings support

Package Exports

  • @mha/scan-edit-lib

Readme

scan-edit-lib

A React component library for document scanning, editing, and processing with OpenCV and Tesseract OCR support.

Features

  • 📄 Document scanning and image capture
  • ✏️ Advanced image editing with Fabric.js canvas
  • 🔍 OCR text recognition with Tesseract.js
  • 🖼️ Image processing with OpenCV.js
  • 📦 Multi-page document management
  • 💾 Export to PDF, TIFF, GeoTIFF formats
  • 🎨 Annotation tools (shapes, text, drawing)

Installation

npm install @HLG/scan-edit-lib

Usage

import {
  DocumentProvider,
  DocumentViewer,
  ScannerCanvas,
  useDocument,
} from "@HLG/scan-edit-lib";

function App() {
  return (
    <DocumentProvider>
      <DocumentViewer />
    </DocumentProvider>
  );
}

Components

DocumentViewer

Main component for viewing and editing documents with full annotation support.

ScannerCanvas

Component for capturing and scanning documents.

UploadCanvas

Component for uploading and processing images.

ImageProcessingTools

Shared image processing utilities and UI components.

Requirements

  • React 18.0.0 or higher
  • Modern browser with Canvas API support

License

MIT


{ files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ])