This is a simple Django web application that allows users to upload a PDF file, convert it to a Word document, and download the converted file. The app utilizes the pdfplumber library for extracting text from PDF files and the python-docx library for creating Word documents.
- Upload a PDF file.
- Extracts text from the PDF using
pdfplumber. - Converts the extracted text into a Word document (
.docxformat). - Allows users to download the converted Word document.
- Django - A high-level Python web framework.
- pdfplumber - A Python library for extracting text from PDF files.
- python-docx - A Python library for creating and modifying Word documents.
Clone this repository to your local machine:
git clone https://github.com/yourusername/pdf-to-word-django.git
cd pdf-to-word-django- Set Up Virtual Environment Create a virtual environment and activate it:
conda create -n pdf_to_word_env python=3.9
conda activate pdf_to_word_env- Install Dependencies Install all the required dependencies:
pip install -r requirements.txtMake sure to include requirements.txt in your repository, containing the necessary libraries:
django==3.2
pdfplumber==0.5.28
python-docx==0.8.11
- Apply Migrations Run the database migrations:
python manage.py makemigrations
python manage.py migrate- Run the Application Locally Start the development server:
python manage.py runserverVisit the app in your browser at http://127.0.0.1:8000/ to test the functionality.
- Navigate to the home page of the app.
- Upload a PDF file that you want to convert.
- Click the "Convert" button.
- Once the conversion is complete, the Word document will be available for download.
This application can be deployed on platforms such as Render or Railway. For deployment instructions, please refer to the respective platform's documentation.
Feel free to fork this repository and submit pull requests. Contributions are welcome!
- Fork the repository.
- Create a new branch for your feature (
git checkout -b feature-name). - Commit your changes (
git commit -am 'Add feature'). - Push to the branch (
git push origin feature-name). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Visit the app in your browser at http://127.0.0.1:8000/ to test the functionality.
=======
ba0b12ae6eef55deef18525ac86bcedf12a4d55d