Skip to content

This is a graphical tool for performing Optical Character Recognition (OCR) on images and converting PDF files to images

Notifications You must be signed in to change notification settings

Nafisarkar/Pdf_Converter_OCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt text


OCR and PDF Helper - SAKUNO

This is a graphical tool for performing Optical Character Recognition (OCR) on images and converting PDF files to images. Additionally, it allows for merging text files within a selected folder. The tool is built using CustomTkinter for the GUI, EasyOCR for OCR, pypdfium2 for PDF manipulation, and Pillow for image handling.

Table of Contents

Features

  • PDF to Image Conversion: Convert PDF files into images, with adjustable DPI settings for image quality.
  • OCR on Images: Perform OCR on images in a selected folder to extract text and save it as .txt files.
  • Merge Text Files: Merge all text files in a folder into a single text file.
  • User-friendly GUI: Built with CustomTkinter, making it easy to navigate.

Installation

To run this project, you need to have Python installed. Follow these steps to set it up:

  1. Clone the repository:

    bash
    Copy code
    git clone https://github.com/yourusername/ocr-pdf-helper.git cd ocr-pdf-helper
  2. Install the required dependencies:

    bash
    Copy code
    pip install customtkinter pypdfium2 Pillow easyocr

    You may need additional libraries like pytorch for EasyOCR depending on your system.

Usage

Once installed, you can run the program directly using Python. The interface provides buttons and options for performing the tasks mentioned below.

PDF Conversion

  1. File Selector: Choose a PDF file that you want to convert into images.
  2. Set DPI: Adjust the DPI (dots per inch) for image quality (default is 100%).
  3. Convert: Convert the PDF into images. The images will be saved in a new folder named after the PDF.

OCR on Images

  1. Folder Selector: Select a folder containing images on which OCR should be performed.
  2. Set OCR Language: Input the languages for OCR in a comma-separated format (e.g., eng,bn for English and Bengali).
  3. Perform OCR: The tool will scan each image, extract text, and save it as a .txt file in the same folder.

Merging Text Files

  1. Folder Selector: Select a folder that contains multiple .txt files.
  2. Merge All Text Files: Click the "Merge All the Text Files" button to combine all the .txt files in the folder into one single file.

GUI Overview

  • PDF Path: Displays the selected PDF file path.
  • Image Preview: After PDF to image conversion, the preview of the first image will be displayed.
  • OCR and Merge Options: Available after selecting a folder for OCR and text merging.

Contributing

Contributions are welcome! Feel free to fork this repository, make changes, and submit a pull request.

Steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature-name).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Developed by Shaon An Nafi.
Feel free to reach out for any questions or suggestions.


This README.md provides clear instructions for installation, usage, and contributing, making your project easy to understand for new users. Let me know if you need any changes!

About

This is a graphical tool for performing Optical Character Recognition (OCR) on images and converting PDF files to images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages