expdf2txt


Nameexpdf2txt JSON
Version 1.1.1 PyPI version JSON
download
home_page
SummaryPDF to TXT
upload_time2024-02-24 14:17:43
maintainer
docs_urlNone
authorGaurav Mehra
requires_python
license
keywords pdf2txt pdftotxt invoice2text invoice2txt ag tech gaurav mehra expdf2txt pdftoimage pdf2image
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EXPDF2TXT

## 🤔 Overview

The expdf2txt is a versatile and efficient package designed for seamless conversion of PDF (Portable Document Format) files into TXT (Plain Text) format.
This package empowers users with a straightforward and reliable method to extract textual content from PDF documents, making it easily accessible and editable."


# ❓ Features

## 1. InvoiceExtractor (Convert Invoice Pdf to Text)

### Code: 
```python
from expdf2txt.invoice2data import InvoiceExtractor
FILEPATH = "invoice_2001321.pdf"
invocie_extractor = InvoiceExtractor(FILEPATH)
data = invocie_extractor.openai_extract_data(format_data=True)
print(data)
```

## 2. ImageExtractor (extract image from pdf)

### Code:   
```python
from expdf2txt.pdf2data import PDFExtractor
FILEPATH = "invoice_2001321.pdf"
pdf_obj = PDFExtractor(FILEPATH)
pdf_obj.extract_image()
```




# 🚀 Methods

## 1. InvoiceExtractor methods :
**openai_extract_data()** 'This method extracts text from a Invoice Pdf'
- **Parameters:**
 1. ***temperature (float, optional):*** The temperature parameter for the OpenAI LLM.
 2. ***api_key (str, optional):*** The API key for accessing OpenAI services. 
                Note: "If the default API key is not functioning, please provide an alternative API key for use."  
 3. ***template (str, optional):*** Custom template string for document extraction.
 4. ***format_data (bool, optional):*** If True, format the extracted data into a dictionary or list; if False, return raw output.
                Note: "If the data is successfully converted into a dictionary, it will be returned as a dictionary. Otherwise, it will be returned as a list."

## 2. PDFExtractor methods:
- **countpages()** 'Count the number of pages in the document.'
- **extract_string()** 'Extract the data from the source.'
- **extract_image()** 'Extract images from the PDF document and saves them as separate files.'


# Dependencies

- **openai**

- **pytesseract**

- **PyPDF2**

- **PyMuPDF**

# License

This project is licensed under the MIT License - see the LICENSE file for details.

# Issues

If you encounter any issues or have suggestions, please create an issue on the GitHub repository.

# Acknowledgments

Mention any libraries or tools you used and give credit to their respective authors.





            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "expdf2txt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pdf2txt,pdftotxt,invoice2text,invoice2txt,ag tech,gaurav mehra,expdf2txt,pdftoimage,pdf2image",
    "author": "Gaurav Mehra",
    "author_email": "gauravmehra930@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4f/4d/444b363fe9b8a264a0fa886ea6d79e1f777ceef9de4d5ce9866b7765f366/expdf2txt-1.1.1.tar.gz",
    "platform": null,
    "description": "# EXPDF2TXT\n\n## \ud83e\udd14 Overview\n\nThe expdf2txt is a versatile and efficient package designed for seamless conversion of PDF (Portable Document Format) files into TXT (Plain Text) format.\nThis package empowers users with a straightforward and reliable method to extract textual content from PDF documents, making it easily accessible and editable.\"\n\n\n# \u2753 Features\n\n## 1. InvoiceExtractor (Convert Invoice Pdf to Text)\n\n### Code: \n```python\nfrom expdf2txt.invoice2data import InvoiceExtractor\nFILEPATH = \"invoice_2001321.pdf\"\ninvocie_extractor = InvoiceExtractor(FILEPATH)\ndata = invocie_extractor.openai_extract_data(format_data=True)\nprint(data)\n```\n\n## 2. ImageExtractor (extract image from pdf)\n\n### Code:   \n```python\nfrom expdf2txt.pdf2data import PDFExtractor\nFILEPATH = \"invoice_2001321.pdf\"\npdf_obj = PDFExtractor(FILEPATH)\npdf_obj.extract_image()\n```\n\n\n\n\n# \ud83d\ude80 Methods\n\n## 1. InvoiceExtractor methods :\n**openai_extract_data()** 'This method extracts text from a Invoice Pdf'\n- **Parameters:**\n 1. ***temperature (float, optional):*** The temperature parameter for the OpenAI LLM.\n 2. ***api_key (str, optional):*** The API key for accessing OpenAI services. \n                Note: \"If the default API key is not functioning, please provide an alternative API key for use.\"  \n 3. ***template (str, optional):*** Custom template string for document extraction.\n 4. ***format_data (bool, optional):*** If True, format the extracted data into a dictionary or list; if False, return raw output.\n                Note: \"If the data is successfully converted into a dictionary, it will be returned as a dictionary. Otherwise, it will be returned as a list.\"\n\n## 2. PDFExtractor methods:\n- **countpages()** 'Count the number of pages in the document.'\n- **extract_string()** 'Extract the data from the source.'\n- **extract_image()** 'Extract images from the PDF document and saves them as separate files.'\n\n\n# Dependencies\n\n- **openai**\n\n- **pytesseract**\n\n- **PyPDF2**\n\n- **PyMuPDF**\n\n# License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n# Issues\n\nIf you encounter any issues or have suggestions, please create an issue on the GitHub repository.\n\n# Acknowledgments\n\nMention any libraries or tools you used and give credit to their respective authors.\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "PDF to TXT",
    "version": "1.1.1",
    "project_urls": {
        "Source": "https://github.com/AgTech930/expdftotxt"
    },
    "split_keywords": [
        "pdf2txt",
        "pdftotxt",
        "invoice2text",
        "invoice2txt",
        "ag tech",
        "gaurav mehra",
        "expdf2txt",
        "pdftoimage",
        "pdf2image"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b27b5a4cd4d90d2b060b89b7ead9f815c89cabe617b2fb8459d3780964b4525",
                "md5": "79fbc32d74ef9d88af8a3ee6eb9a9282",
                "sha256": "354412dc3775e1047c81acc68694202b90b857d7d78bcacf7838f3f227c50dac"
            },
            "downloads": -1,
            "filename": "expdf2txt-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "79fbc32d74ef9d88af8a3ee6eb9a9282",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5600,
            "upload_time": "2024-02-24T14:17:40",
            "upload_time_iso_8601": "2024-02-24T14:17:40.858524Z",
            "url": "https://files.pythonhosted.org/packages/3b/27/b5a4cd4d90d2b060b89b7ead9f815c89cabe617b2fb8459d3780964b4525/expdf2txt-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f4d444b363fe9b8a264a0fa886ea6d79e1f777ceef9de4d5ce9866b7765f366",
                "md5": "68eff44b51b68adf8cc897194cde3b3e",
                "sha256": "170df1a04badf9f76836c9e84eb7d81f8a2f763db01be1dd8c6d017221c7b9c7"
            },
            "downloads": -1,
            "filename": "expdf2txt-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "68eff44b51b68adf8cc897194cde3b3e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4895,
            "upload_time": "2024-02-24T14:17:43",
            "upload_time_iso_8601": "2024-02-24T14:17:43.351544Z",
            "url": "https://files.pythonhosted.org/packages/4f/4d/444b363fe9b8a264a0fa886ea6d79e1f777ceef9de4d5ce9866b7765f366/expdf2txt-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-24 14:17:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AgTech930",
    "github_project": "expdftotxt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "expdf2txt"
}
        
Elapsed time: 0.18938s