Giter Site home page Giter Site logo

tesseract-ocr-recursive's Introduction

Tesseract OCR Recursive

This script is designed to perform Optical Character Recognition (OCR) on all PDF files within its directory using Tesseract OCR, and outputs the results to a specified output directory. The script leverages ocrmypdf to apply OCR to PDF files, making them searchable and editable.

Features

  • Automatically identifies and processes all PDF files in the script's directory.
  • Outputs OCR-processed PDFs to a subdirectory named output.
  • Utilizes Tesseract OCR for text recognition.

Requirements

  • Python 3.x
  • ocrmypdf
  • Tesseract OCR

Installation

Python Dependencies

To install the required Python dependencies, run the following command:

pip install ocrmypdf

Tesseract OCR

Windows

  1. Download the Tesseract installer from the official Tesseract repository.
  2. Run the installer and follow the instructions.
  3. Add Tesseract to your system PATH:
    • Open the Start Menu and search for "Environment Variables".
    • Click on "Edit the system environment variables".
    • In the System Properties window, click on the "Environment Variables..." button.
    • In the Environment Variables window, find the "Path" variable in the "System variables" section and click "Edit...".
    • Click "New" and add the path to the Tesseract executable (e.g., C:\Program Files\Tesseract-OCR).
    • Click "OK" to close all windows.

Usage

  1. Place the script in the directory containing the PDF files you want to process.
  2. Run the script using Python:
python Tesseract_OCR_Recursive.py

The script will create an output directory in the same location and save all OCR-processed PDFs there. It will print messages to the console indicating the success or failure of the OCR process for each file.

tesseract-ocr-recursive's People

Contributors

maccheroncelli avatar

Watchers

 avatar

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.