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

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.0.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.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rtm_pdf_processor-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 327fd944291c296535ce36a987cdc2bef95be18e48e751209e5cd7ea0c53866a
MD5 043f9f27d58773ec0a3c95c7d31cf1ba
BLAKE2b-256 c17956ad8dba20d626c6a9f14e2f729e05375d8bec0ba3308e8e24aabec16378

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rtm_pdf_processor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afd892385231bacef9801088d323c13d892bb05fe19e5a534e97ed916f5c0ff2
MD5 b473916023fd3913e48fad1d5c5e39f6
BLAKE2b-256 a3736f10283ff5461cb262a671a0405bcd4b3eeb310778d8b75f449ad41201bd

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