Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marwan-ahmed-23/pdf-to-images-conversion-python
A lightweight Python service for converting PDF files into images using pdftoppm. It generates one PNG image per page in the PDF.
https://github.com/marwan-ahmed-23/pdf-to-images-conversion-python
file-conversion image-extraction image-processing open-source open-source-python pdf-to-image pdf-tools python-library python-scripts python-utilities
Last synced: 10 days ago
JSON representation
A lightweight Python service for converting PDF files into images using pdftoppm. It generates one PNG image per page in the PDF.
- Host: GitHub
- URL: https://github.com/marwan-ahmed-23/pdf-to-images-conversion-python
- Owner: marwan-ahmed-23
- License: mit
- Created: 2024-12-08T06:59:21.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-27T06:20:24.000Z (20 days ago)
- Last Synced: 2024-12-27T07:21:50.495Z (20 days ago)
- Topics: file-conversion, image-extraction, image-processing, open-source, open-source-python, pdf-to-image, pdf-tools, python-library, python-scripts, python-utilities
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PDF to Images Conversion (Python)
A lightweight Python service for converting PDF files into images using `pdftoppm`. It generates one PNG image per page in the PDF.
---
## 🚀 Features
- Converts PDF files to PNG images.
- Outputs one image per page in the PDF.
- Lightweight and easy to use.## ⚙️ Requirements
- Python 3.7 or higher.
- `pdftoppm` installed on the system (part of `poppler-utils`).## 🔧 Installation
1. Clone the repository:
```bash
git clone https://github.com/marwan-ahmed-23/PDF-to-Images-Conversion-python.git
```2. Install `pdftoppm` (if not already installed):
```bash
sudo apt install poppler-utils
```## 📖 Usage
### Example
Use the provided example script in the `examples/` directory:
```bash
from src.pdf_to_images import PdfToImagespdf_path = "sample.pdf"
output_dir = "output"converter = PdfToImages(pdf_path, output_dir)
images = converter.convert()print(images)
```Place a sample PDF in the `examples/` folder and run the script:
```bash
python examples/example.py
```## 📂 Directory Structure
```plaintext
PDF-to-Images-Conversion-python/
├── examples/
│ └── example.py
├── src/
│ └── pdf_to_images.py
├── LICENSE
├── .gitignore
└── README.md
```## 🤝 Contributing
Contributions are welcome! Feel free to submit a pull request or open an issue to report bugs or suggest features.
## 🌟 Show Your Support
If you found this project helpful, please consider giving it a ⭐ on GitHub. Your support means the world to us!