Skip to main content

PDF to image and text extraction utility

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))

Installation

pip install rtm-pdf-processor

  • 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)

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rtm_pdf_processor-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 98ee6ad876077ca3dd39960c33dd092dfce524ea9ecc4ac8c7b6eef119ec5538
MD5 07e823d7770af3db68c4ec7b34b5aec2
BLAKE2b-256 677732b636dce5b36028d1d826d657132acd04d4282eb93cbb5315fab585489e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rtm_pdf_processor-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3468f3598a6c1fbff0eb54df4fc97bdc174bfabbd0b1ed08e4ae96cba89b3ce
MD5 7a1e1fb2d8a6f9549467a4e3671caf17
BLAKE2b-256 8c154aa16d87cc18f7006636ab1cd97922ac8eb95428fb175436b201bbe2a7ea

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