@mha/scan-edit-lib
v1.0.4
Published
A React component library for document scanning, editing, and processing with OpenCV and Tesseract OCR support
Maintainers
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-libUsage
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... }, }, ])
