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)

```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.2.tar.gz (2.7 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.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rtm_pdf_processor-0.1.2.tar.gz
  • Upload date:
  • Size: 2.7 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.2.tar.gz
Algorithm Hash digest
SHA256 7efad2d9eaad5546071f517e5f0547a6e54b5f4eec133b0ea29c8502833d4b3b
MD5 b555e33905ee1b89f2d05cfbeba036e2
BLAKE2b-256 c9db4e02e9909bcd4e8d5b8aac3c266c2f0142847d1066bf2e2986e38eefd1ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rtm_pdf_processor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 89f666490c12984600ae1ea34cf445f0f8728de2dbcfabcb6a725868699d18df
MD5 cd9dc814adf18fe5add05459a9e2636d
BLAKE2b-256 5eeb6bf1538e5eca0f5ff78a6e5f22abd3342d1017d5efb2cc171e07f527ad4d

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