PHPackages                             opencat/filter-pptx - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. opencat/filter-pptx

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

opencat/filter-pptx
===================

PowerPoint (.pptx) file filter for the OpenCAT Framework

00PHP

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/shaikhammar/opencat-filter-pptx)[ Packagist](https://packagist.org/packages/opencat/filter-pptx)[ RSS](/packages/opencat-filter-pptx/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

catframework/filter-pptx
========================

[](#catframeworkfilter-pptx)

Microsoft PowerPoint PPTX file filter for the [CAT Framework](https://github.com/shaikhammar/cat-framework).

Installation
------------

[](#installation)

```
composer require catframework/filter-pptx
```

Requires `ext-dom`, `ext-libxml`, and `ext-zip`.

Usage
-----

[](#usage)

```
use CatFramework\FilterPptx\PptxFilter;

$filter = new PptxFilter();

// Extract translatable segments
$document = $filter->extract('slides.pptx', 'en', 'fr');

foreach ($document->getSegmentPairs() as $pair) {
    $pair->target = new Segment('seg-t', [$translatedText]);
}

// Write the translated PPTX
$filter->rebuild($document, 'slides.fr.pptx');
```

What gets extracted
-------------------

[](#what-gets-extracted)

Each non-empty `` paragraph in the presentation is one segment. Slide order follows `ppt/_rels/presentation.xml.rels`, which preserves the authoring application's declared order.

**Extracted locations** (per slide, in order):

1. Slide content (`ppt/slides/slideN.xml`)
2. Speaker notes (`ppt/notesSlides/notesSlideN.xml`), if present

**Hidden slides** (marked `show="0"` on the root `` element) are silently skipped.

Adjacent runs with identical DrawingML formatting (``) are merged before extraction. Remaining formatting runs become `InlineCode` pairs.

RTL support
-----------

[](#rtl-support)

When the target language is a right-to-left language, `rtl="1"` is set on each run's `` and on the paragraph's `` on rebuild.

Supported RTL language prefixes: `ar`, `he`, `fa`, `ur`, `yi`, `dv`, `ps`, `sd`.

Skeleton format
---------------

[](#skeleton-format)

The skeleton is a temporary PPTX file written to the system temp directory at extract time:

```
['path' => '/tmp/cat-.skl']
```

The skeleton is a copy of the original PPTX ZIP with paragraph content replaced by `{{SEG:NNN}}` tokens. **Do not delete it** between `extract()` and `rebuild()` calls.

Limitations
-----------

[](#limitations)

- **Charts and SmartArt**: text embedded in chart data or SmartArt XML is not extracted.
- **Embedded objects**: OLE objects and embedded workbooks are not processed.
- **Skeleton lifetime**: the `.skl` temp file must survive between `extract()` and `rebuild()`. For long-lived workflows, persist `$document->skeleton['path']`.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6b9044413071860fd6199e56c661a24f449797b77a1b130f0df7e98be8481f4?d=identicon)[shaikhammar](/maintainers/shaikhammar)

---

Top Contributors

[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (2 commits)")

### Embed Badge

![Health badge](/badges/opencat-filter-pptx/health.svg)

```
[![Health](https://phpackages.com/badges/opencat-filter-pptx/health.svg)](https://phpackages.com/packages/opencat-filter-pptx)
```

###  Alternatives

[jasonlam604/stringizer

Stringizer is a PHP string manipulation library with support for method chaining and multibyte handling

35110.5k1](/packages/jasonlam604-stringizer)[t3docs/site-package

Site Package - This site package is an example used to understand the TYPO3 Site Package Tutorial.

1416.6k](/packages/t3docs-site-package)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
