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.
- 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
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 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.")
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.
-
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.
- 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.
- 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
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.
This project is licensed under the MIT License. See the LICENSE file for details.
Created by Burak Civelek
Feel free to reach out for questions or suggestions!