Skip to main content

PDF to image and text extraction utility using Tesseract OCR

Project description

RTM PDF Processor

Developed and Maintained by Raviteja Mulukuntla

Python library to:

  • Create PDFS directory in root directory and place your pdf files before accessing this loadPdfs

  • Extract Hindi + English text

  • Txt files will be saved to folder named PdfTextFiles

  • Full file text will be available at (text = pdfProcessor.extractTextFromPdf(pdf))

  • Usage Guide:

from rtm_pdf_processor import RTMPdfProcessor
import os

pdfs_dir = os.getenv("PDFS_DIR", "./PDFS")
images_dir = os.getenv("Images_DIR", "PdfImages")
texts_dir = os.getenv("Texts_DIR", "PdfTextFiles")

pdfProcessor = RTMPdfProcessor(pdfs_dir, images_dir, texts_dir)

pdf_files = []
# Create PDFS directory in root directory and place your pdf files before accessing this loadPdfs
pdf_files = pdfProcessor.loadPdfs()

for pdf in pdf_files:
    pdfContent = pdfProcessor.readPdf(pdf)
    print(f"Read {len(pdfContent)} bytes from {pdf}")
    text = pdfProcessor.extractTextFromPdf(pdf,True,True)
    print("*" * 50)
    print(f"Extracted text from {pdf}:")
    print(text)

## Installation
```bash
pip install rtm-pdf-processor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtm_pdf_processor-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rtm_pdf_processor-0.1.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file rtm_pdf_processor-0.1.1.tar.gz.

File metadata

  • Download URL: rtm_pdf_processor-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for rtm_pdf_processor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f08742a5a120275d3147761e0bf6a9525676494c5d85ed08d97ae3a83f72479e
MD5 f31d97869b78bc18e11a2669c4348f0f
BLAKE2b-256 7a9f17278b1cbbec10cb475c4bf9c1458b08a0baa36dfb87c4e2198eec03936e

See more details on using hashes here.

File details

Details for the file rtm_pdf_processor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rtm_pdf_processor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f43019a068a32addf48aac001b80eb399bbeee85fcf03fcb3151312361117567
MD5 b5a99f4ae159cf26face55cf76d2d44e
BLAKE2b-256 313d638e3ff343366757f2b5b93eae84666e31d44fadde736cee3bab810d01d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page