https://github.com/antoinekllee/pdf-ocr
Extract text from an uploaded PDF using OCR.
https://github.com/antoinekllee/pdf-ocr
Last synced: about 2 months ago
JSON representation
Extract text from an uploaded PDF using OCR.
- Host: GitHub
- URL: https://github.com/antoinekllee/pdf-ocr
- Owner: antoinekllee
- Created: 2024-06-20T02:26:34.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-20T14:29:05.000Z (11 months ago)
- Last Synced: 2025-01-31T12:17:48.360Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 191 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PDF Text Extractor
Simple MERN webapp to extract text from an uploaded PDF using OCR.
## Technologies
- React for the frontend
- Express for the backend
- Multer for handling file uploads
- pdfjs-dist and pdf-parse for PDF parsing
- Tesseract.js for OCR**NOTE:** If the text data is embedded directly in the PDF (the PDF contains searchable text), `pdf-parse` is used directly to extract the text. If the text data is not directly embedded (the PDF contains scanned images or non-searchable text), each page is converted to an image using `pdf.js` and then sent to `Tesseract.js` for OCR.
## Setup Instructions
### Installation
1. Clone the repository:
```bash
https://github.com/antoinekllee/pdf-ocr.git
cd pdf-ocr
```2. Install dependencies for the frontend:
```bash
cd client
npm install
```3. Install dependencies for the backend:
```bash
cd ../server
npm install
```### Running the Application
1. Start the backend server:
```bash
cd server
npm start
```2. Start the frontend development server:
```bash
cd ../client
npm start
```3. Open your browser and navigate to `http://localhost:3000` to use the application.