Convert .pptx presentations to image files easily.
Project description
pptxtoimages
Overview
pptxtoimages is a lightweight Python package to convert .pptx PowerPoint presentations into high-quality image files (PNG by default).
It uses LibreOffice (soffice) to convert .pptx files to PDF, then converts PDF pages to images using pdf2image.
This project aims to provide an easy-to-use, open-source tool for developers who need to quickly generate slide images from PowerPoint files for further processing, presentations, or video creation.
Features
- Convert
.pptxslides to images automatically - Output images saved in PNG format by default
- Supports batch processing of multi-slide presentations
- Cross-platform support (Windows, Linux, macOS) with LibreOffice installed
- CLI support for quick command line usage
Installation
Make sure you have the following prerequisites installed:
- LibreOffice (
sofficecommand available in your system PATH) - Poppler utilities installed (
poppler-utilson Linux)
Then install the package via pip:
pip install pptxtoimages
Usage
Python
from pptxtoimages.tools import PPTXToImageConverter
# Initialize converter
converter = PPTXToImageConverter(pptx_path)
# Convert your .pptx file to images
images = converter.convert("path/to/presentation.pptx", output_dir="output_images")
print(f"Converted {len(images)} slides to images.")
Command Line Interface (CLI)
Convert a pptx file directly from the terminal :
pptxtoimages-cli path/to/presentation.pptx --output output_images
Note : For more examples and details, please check the example.py file.
Configuration
-
Output image format is PNG by default, but can be customized in the Converter class parameters.
-
Output directory will be created if it does not exist.
Development
To contribute or develop locally:
- Clone the repository
- Create a virtual environment and activate it
- Install dependencies:
pip install -r requirements.txt
- Install pre-commit hooks (optional but recommended)
- This ensures your code is auto-formatted (e.g., by black) before each commit.
Versioning
- You may use
bump2versionto suggest version changes only if authorized by the project maintainer. Please respect versioning boundaries – we welcome contributions, but all official releases are maintained and approved manually by the maintainer.
- Open a pull request
Links
Support This Project
If you find pptxtoimages helpful or useful, please consider giving it a star on GitHub! Your support helps the project grow and motivates further development.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
Created by Burak Civelek
Feel free to reach out for questions or suggestions!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pptxtoimages-0.1.12.tar.gz.
File metadata
- Download URL: pptxtoimages-0.1.12.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
481ae0fbe8b7559c041dcc8abdf82475bfb7d31402dbd7c20f9d046bbaba3b97
|
|
| MD5 |
f5690c4c7c09b80026efd7949fc2aba7
|
|
| BLAKE2b-256 |
a7501de5a0255cfff984e8026f43bc7f6335c802c77668f894cc1be485c07c46
|
File details
Details for the file pptxtoimages-0.1.12-py3-none-any.whl.
File metadata
- Download URL: pptxtoimages-0.1.12-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d9d2f940f1bd6459cd594aa6e2a326d8750ca8e530800c5a3bcafa0df177bd
|
|
| MD5 |
0298daee2ba8b2f5ce3114c99b949b03
|
|
| BLAKE2b-256 |
3bc4bb6044abf827d3c73357dc6ce0ef650eda1c9b33af503e69d70c8f5b8a96
|