Metadata-Version: 2.4
Name: pptx-raster
Version: 1.0.1
Summary: Pure-Python PPTX toolkit: render slides to images, convert, extract, template, merge - no PowerPoint, no LibreOffice
Author: Raju Kumar
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://www.codevartech.com
Project-URL: Contact, https://www.codevartech.com/contact
Keywords: pptx,powerpoint,render,image,thumbnail,pdf,ooxml,drawingml,presentation,slides,convert
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: COMMERCIAL-LICENSE.md
Requires-Dist: python-pptx>=1.0.2
Requires-Dist: Pillow>=10.0
Requires-Dist: resvg-py>=0.1
Requires-Dist: msoffcrypto-tool>=5.0
Requires-Dist: cryptography>=40
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: numpy; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: numpy; extra == "dev"
Requires-Dist: pywin32; sys_platform == "win32" and extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocstrings[python]; extra == "docs"
Dynamic: license-file

# pptx-raster

The pure-Python PPTX toolkit: render slides to images, convert, extract, template,
merge. **No PowerPoint. No LibreOffice. No external applications.**

```bash
pip install pptx-raster          # PyPI package name
```

> Install as **`pptx-raster`**, import as **`pptx_raster`**.

```python
from pptx_raster import (render, thumbnail, to_gif, contact_sheet,     # imaging
                      to_pdf, to_markdown, from_markdown,           # conversion
                      extract_text, extract_tables, extract_images, # extraction
                      replace_text, add_watermark,                  # templating
                      merge, split)                                 # deck ops

paths = render("deck.pptx", "out/", fmt="jpg", scale=2.0)   # -> [Path, ...]
for slide_idx, msgs in paths.warnings.items():               # honest warnings
    print(slide_idx, msgs)

render("secret.pptx", "out/", password="hunter2")            # encrypted decks work too
```

CLI (same features):

```bash
pptx_raster render deck.pptx -o out/ --format png --scale 2
pptx_raster pdf deck.pptx -o deck.pdf          pptx_raster gif deck.pptx -o deck.gif
pptx_raster thumb deck.pptx -o thumbs/         pptx_raster sheet deck.pptx -o overview.png
pptx_raster md deck.pptx -o deck.md            pptx_raster md2pptx notes.md -o deck.pptx
pptx_raster replace deck.pptx --map "{name}=ACME" -o out.pptx
pptx_raster watermark deck.pptx --text DRAFT -o out.pptx
pptx_raster merge a.pptx b.pptx -o all.pptx    pptx_raster split deck.pptx -o parts/
```

## How it works

Built on `python-pptx` (OOXML parsing) + `Pillow` (rasterization) + `resvg`
(embedded SVG icons). Implements the DrawingML rendering pipeline: theme/color
resolution with full inheritance (slide → layout → master → theme), an ECMA-376
preset-geometry interpreter (all 187 preset shapes), freeform paths, group
transforms, rotation/flips, alpha compositing, a text layout engine with font
substitution, and tables. See `Documentation/` for the R&D studies behind it.

## Fidelity

Measured by per-slide SSIM against PowerPoint's own renders on a 146-slide
corpus of real business decks (CI-gated):

| Engine | Mean SSIM vs PowerPoint |
| --- | --- |
| Aspose.Slides (commercial, ~$1000/dev) | 0.878 |
| **pptx-raster** | **0.860–0.878 per deck** |
| Spire.Presentation (commercial) | 0.50–0.84, fails to load some decks |

## Supported features (v1)

| Feature | Status |
| --- | --- |
| Solid fills, theme colors, alpha/tint/shade | ✅ full |
| All 187 preset autoshapes + freeform paths | ✅ full |
| Rotation, flips, group shapes (nested) | ✅ full |
| Pictures (PNG/JPG, crop, geometry clipping) | ✅ full |
| SVG pictures | ✅ full (rasterized via resvg) |
| Text: fonts, size, bold/italic, color, wrap, alignment, anchors | ✅ full |
| Placeholder style inheritance (layout/master) | ✅ full |
| Bullets (char + auto-numbered) | ✅ full |
| Tables (grid, fills, borders, cell text) | ✅ full |
| Missing fonts | ⚠️ metric-compatible substitution + warning |
| Charts: clustered column, line, pie | ✅ full (native rendering) |
| Other chart types, SmartArt, OLE | ⬜ labeled placeholder + warning |
| Gradients, shadows/effects, WordArt, autofit | ⬜ not rendered (warning) |

The renderer **never throws on unsupported content** — it degrades to a labeled
placeholder and reports a warning, so you always get your images.

## License

pptx-raster is **proprietary software**. Without a license key it runs in
**evaluation mode** — output is watermarked and limited to the first 10 slides
per deck. A paid **annual per-developer license** unlocks full, unwatermarked output.

**Buy / activate:** email **info@codevartech.com** or visit
**https://www.codevartech.com/contact** (self-serve purchase page coming soon).
Publisher: Codevar Technology Pvt. Ltd. (India) — https://www.codevartech.com

Activate in code:

```python
from pptx_raster import set_license
set_license("YOUR-KEY")        # or set the PPTX_RASTER_LICENSE environment variable
```

The full licensing terms ship as `COMMERCIAL-LICENSE.md` inside the package.
