A pure-Python converter from legacy PowerPoint .ppt files to .pptx
Project description
ppt2pptx
ppt2pptx converts Microsoft PowerPoint 97–2003 binary .ppt presentations
to Office Open XML .pptx using only the Python standard library. It reads
the CFB/OLE container and PowerPoint record stream directly; it never launches
PowerPoint, LibreOffice, COM, or a conversion service.
The project is useful for a broad set of real presentations, but it is not a complete implementation of every legacy PowerPoint feature. Unsupported or lossy content is diagnosed instead of being silently presented as fully faithful.
Highlights
- Opens RC4 CryptoAPI password-protected presentations when a password is supplied.
- Preserves normal slide order and dimensions without mistaking masters or notes for slides.
- Preserves hidden-slide state so excluded slides remain hidden during slide shows.
- Restores positioned editable text, fonts, sizes, colors, bold/italic/underline, paragraph alignment, bullets, rotation, flips, and safe external hyperlinks.
- Preserves PNG, JPEG, GIF, TIFF, EMF, WMF, and PICT media, including cropping, position, rotation, and flips when present.
- Recreates common editable shapes, solid/gradient backgrounds, comments, speaker notes, slide numbers, dates, headers, and footers.
- Copies common core properties such as title, author, keywords, and timestamps.
- Supports atomic single-file and recursive batch conversion with JSON diagnostics.
Usage
python -m pip install ppt2pptx
ppt2pptx presentation.ppt
ppt2pptx presentation.ppt -o presentation.pptx --report report.json
ppt2pptx protected.ppt --password-file password.txt
ppt2pptx inspect presentation.ppt --json
ppt2pptx batch input-directory -o output-directory --recursive --report batch.json
The input is always read-only and output files are written atomically. The converter refuses to overwrite its input.
The Python API accepts the password directly:
from ppt2pptx import convert
result = convert("protected.ppt", "protected.pptx", password="secret")
print(result.report.to_dict())
Current limitations
Charts, SmartArt, animation timelines, audio/video playback, embedded OLE objects, and complex freeform or grouped master geometry remain incomplete. Solid and common gradient backgrounds are retained, while advanced fills and effects may be approximated. PICT data is preserved, but rendering depends on the PPTX consumer. PowerPoint 95 and earlier files use a different record format and are deliberately rejected with a clear error.
Development
python -m pip install -e .
PYTHONPATH=src python -m unittest discover -s tests -v
python -m build
The converter itself does not depend on LibreOffice. The real-file regression script may use LibreOffice only to verify that generated packages render:
PYTHONPATH=src python scripts/validate_real_files.py tests/real_samples \
-o tests/real_output --render --password hello
Specification
Project details
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 ppt2pptx-0.3.1.tar.gz.
File metadata
- Download URL: ppt2pptx-0.3.1.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd59b902f1b4bd13a2cfd6ef93858878a542a4e7f522cdebc35bd8796b62d4f6
|
|
| MD5 |
1122946e7ea687d51eb93f8d138827eb
|
|
| BLAKE2b-256 |
0525806ee926b07c626c3dd84c134520178960ae47e62e253d9e475425730a4e
|
Provenance
The following attestation bundles were made for ppt2pptx-0.3.1.tar.gz:
Publisher:
publish-to-pypi.yml on HuiTurn/ppt2pptx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppt2pptx-0.3.1.tar.gz -
Subject digest:
cd59b902f1b4bd13a2cfd6ef93858878a542a4e7f522cdebc35bd8796b62d4f6 - Sigstore transparency entry: 2218204131
- Sigstore integration time:
-
Permalink:
HuiTurn/ppt2pptx@b0c813932e9d5525c0014cbcdf7bb2479e5061e6 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/HuiTurn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@b0c813932e9d5525c0014cbcdf7bb2479e5061e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ppt2pptx-0.3.1-py3-none-any.whl.
File metadata
- Download URL: ppt2pptx-0.3.1-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e6d3675a0d6dad72616c1d8daa3c47c52e65a2349c19de820f65a6d0f3a74bb
|
|
| MD5 |
89e9be84d97fa10e196bacec5928bf11
|
|
| BLAKE2b-256 |
ef22c20627828311dabfce5055f890fe08b61365df1676ddedd102b883488e93
|
Provenance
The following attestation bundles were made for ppt2pptx-0.3.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on HuiTurn/ppt2pptx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ppt2pptx-0.3.1-py3-none-any.whl -
Subject digest:
4e6d3675a0d6dad72616c1d8daa3c47c52e65a2349c19de820f65a6d0f3a74bb - Sigstore transparency entry: 2218204145
- Sigstore integration time:
-
Permalink:
HuiTurn/ppt2pptx@b0c813932e9d5525c0014cbcdf7bb2479e5061e6 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/HuiTurn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@b0c813932e9d5525c0014cbcdf7bb2479e5061e6 -
Trigger Event:
push
-
Statement type: