Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marwan-ahmed-23/merge-images-to-pdf-python
A Python project for merging multiple images into a single PDF file. This tool is designed to simplify the process of consolidating images into a single, compact file format.
https://github.com/marwan-ahmed-23/merge-images-to-pdf-python
data-processing developer-tools file-merging image-processing image-to-pdf open-source open-source-python pdf-creation pdf-tools python python-library python-scripts python-utilities
Last synced: 10 days ago
JSON representation
A Python project for merging multiple images into a single PDF file. This tool is designed to simplify the process of consolidating images into a single, compact file format.
- Host: GitHub
- URL: https://github.com/marwan-ahmed-23/merge-images-to-pdf-python
- Owner: marwan-ahmed-23
- License: mit
- Created: 2024-12-04T06:19:37.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-27T06:39:22.000Z (20 days ago)
- Last Synced: 2024-12-27T07:26:07.510Z (20 days ago)
- Topics: data-processing, developer-tools, file-merging, image-processing, image-to-pdf, open-source, open-source-python, pdf-creation, pdf-tools, python, python-library, python-scripts, python-utilities
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Merge Images to PDF (Python)
A Python project for merging multiple images into a single PDF file. This tool is designed to simplify the process of consolidating images into a single, compact file format.
---
## 🚀 Features
- Merge multiple images (JPEG, PNG, etc.) into a single PDF.
- Supports basic image resizing to fit within the PDF pages.
- Easy-to-use modular structure.## ⚙️ Requirements
- Python 3.8+
- Install dependencies using:```bash
pip install -r requirements.txt
```## 🔧 Installation
To use this project, follow these steps:
1. **Clone the Repository**
Clone this repository to your local machine:
```bash
git clone https://github.com/marwan-ahmed-23/Merge-Images-to-PDF-python.git
cd Merge-Images-to-PDF-python
```2. **Create a Virtual Environment (Optional)**
It is recommended to use a virtual environment for Python projects:
```bash
python -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windows
```3. **Install Dependencies**
Install the required Python libraries using pip:
```bash
pip install -r requirements.txt
```4. **Run Examples**
Test the functionality by running the example script:
```bash
python examples/example.py
```>### Notes:
> Ensure the file `requirements.txt` contains the dependencies: `fpdf` `pillow`## Example
```bash
from src.merge_images_to_pdf import merge_images_to_pdfimages = ["image1.jpg", "image2.png", "image3.jpeg"]
output_path = "output.pdf"merge_images_to_pdf(images, output_path)
print(f"PDF saved at {output_path}")
```## 📂 Directory Structure
```plaintext
Merge-Images-to-PDF-python/
├── examples/
│ └── example.py
├── src/
│ └── merge_images_to_pdf.py
├── LICENSE
├── README.md
└── .gitignore
```## 🤝 Contributing
Feel free to fork this repository and submit pull requests to enhance functionality or add features.
## 🌟 Show Your Support
If you found this project helpful, please consider giving it a ⭐ on GitHub. Your support means the world to us!