GithubHelp home page GithubHelp logo

sweatnessstrong / pdf-to-word-converter Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3 KB

This Python script converts a PDF file to Word format using OCR (Optical Character Recognition). It extracts text from each page of the PDF, converts the pages to images, performs OCR on the images, and saves the extracted text to text files.

Python 100.00%
pdf2image pypdf2 pytesseract pytesseract-ocr python

pdf-to-word-converter's Introduction

PDF to Word Converter with OCR

This Python script converts a PDF file to Word format using OCR (Optical Character Recognition). It extracts text from each page of the PDF, converts the pages to images, performs OCR on the images, and saves the extracted text to text files.

Features

  • Extracts text from each page of a PDF file
  • Converts PDF pages to images for OCR
  • Performs OCR using Tesseract
  • Saves extracted text to text files

Installation

  1. Clone the repository:

    git clone https://github.com/Sweatnessstrong/pdf-to-word-converter.git
    
  2. Install the required libraries:

    pip install PyPDF2 pytesseract pdf2image
    
  3. Set the path to the Tesseract executable in the script:

    pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'

Usage

  1. Place your PDF file in the project directory.
  2. Run the script:
    python pdf_to_word_converter.py
    

Dependencies

  • PyPDF2
  • pytesseract
  • pdf2image

Contributing

  1. Fork the repository
  2. Create a new branch (git checkout -b feature)
  3. Make your changes
  4. Commit your changes (git commit -am 'Add new feature')
  5. Push to the branch (git push origin feature)
  6. Create a new Pull Request

pdf-to-word-converter's People

Contributors

sweatnessstrong avatar

Watchers

 avatar  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.