PHPackages                             nowo-tech/html-to-word-bundle - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. nowo-tech/html-to-word-bundle

ActiveSymfony-bundle[PDF &amp; Document Generation](/categories/documents)

nowo-tech/html-to-word-bundle
=============================

Symfony bundle: HTML (WYSIWYG output) → DOCX with named YAML profiles, PHPWord, sanitization and tagged transformers.

v1.1.1(1mo ago)02[6 PRs](https://github.com/nowo-tech/HtmlToWordBundle/pulls)MITPHPPHP &gt;=8.2 &lt;8.6CI passing

Since May 7Pushed 1mo agoCompare

[ Source](https://github.com/nowo-tech/HtmlToWordBundle)[ Packagist](https://packagist.org/packages/nowo-tech/html-to-word-bundle)[ Docs](https://github.com/nowo-tech/HtmlToWordBundle)[ RSS](/packages/nowo-tech-html-to-word-bundle/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (32)Versions (17)Used By (0)

HtmlToWordBundle
================

[](#htmltowordbundle)

[![CI](https://github.com/nowo-tech/HtmlToWordBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/nowo-tech/HtmlToWordBundle/actions/workflows/ci.yml)[![Packagist Version](https://camo.githubusercontent.com/6e04b550c8b4ac45563ca34b110bfb655c814c0d50214980da56f13b9130b5c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f776f2d746563682f68746d6c2d746f2d776f72642d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/nowo-tech/html-to-word-bundle)[![Packagist Downloads](https://camo.githubusercontent.com/ba94f068290d9e0a6f18932401e2d85906fb4f6c720beeff06e30299ad2f1277/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f776f2d746563682f68746d6c2d746f2d776f72642d62756e646c652e737667)](https://packagist.org/packages/nowo-tech/html-to-word-bundle)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP](https://camo.githubusercontent.com/3f99b197569aa2dcfbefff17ecc68d74098e7f929d8b52dc40f3a898f740eae1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f6c6f676f3d706870)](https://php.net)[![Symfony](https://camo.githubusercontent.com/35e729466e7c04d8e831d5ba45054ae825182b6800a4aa45c2296529d75b5b19/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d362e34253230253743253230372e34253242253230253743253230382e30253230253743253230382e312532422d3030303030303f6c6f676f3d73796d666f6e79)](https://symfony.com)[![GitHub stars](https://camo.githubusercontent.com/4862b15c7864dc92061c1e2c72d48357d5ad9f3800bcc50c638ca5df956e723d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6e6f776f2d746563682f68746d6c2d746f2d776f72642d62756e646c652e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/nowo-tech/HtmlToWordBundle)[![Coverage](https://camo.githubusercontent.com/37564047fd63f94cb9cf6a7f594b0860fd9eeb5c17bf34f5d75e649d0c40125a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f7665726167652d7e38392532352d677265656e)](#tests-and-coverage)

> ⭐ **Found this useful?** Install from Packagist (`composer require nowo-tech/html-to-word-bundle`) and consider starring [HtmlToWordBundle on GitHub](https://github.com/nowo-tech/HtmlToWordBundle).

Symfony bundle that converts **rich HTML** (WYSIWYG output from TipTap, CKEditor, etc.—already rendered server-side) into a downloadable **`.docx`** using **PHPWord**, with:

- **named YAML profiles** + **default profile** + **deep merge** with per-call options, or **`convertWithInlineProfile()`** for a full stored profile (no YAML merge);
- **sanitization** and HTML5 parsing (**masterminds/html5**);
- **tagged transformers** for block elements (`p`, headings, lists, tables, images, …);
- **remote &amp; inline images** — optional download of `http(s)://` `` to temp paths before PhpWord, with cleanup after DOCX `save`;
- optional **header/footer** (logo, text, page numbers) per profile;
- **Symfony-friendly export**: streamed/binary responses, local path, optional **Flysystem**.

This bundle does **not** render Twig, generate HTML, produce PDF, or edit existing Word files.

Documentation
-------------

[](#documentation)

- [Installation](docs/INSTALLATION.md)
- [Configuration](docs/CONFIGURATION.md)
- [Usage](docs/USAGE.md)
- [Contributing](docs/CONTRIBUTING.md)
- [Changelog](docs/CHANGELOG.md)
- [Upgrading](docs/UPGRADING.md)
- [Release](docs/RELEASE.md)
- [Security](docs/SECURITY.md)
- [Engram](docs/ENGRAM.md)
- [Spec-driven development](docs/SPEC-DRIVEN-DEVELOPMENT.md)

### Additional documentation

[](#additional-documentation)

- [FrankenPHP demos](docs/DEMO-FRANKENPHP.md) — how `demo/symfony7` runs in Docker.
- Example YAML profiles are shipped as `src/Resources/config/nowo_html_to_word.yaml` (copy into your app’s `config/packages/`).

Requirements
------------

[](#requirements)

- PHP **8.2+**
- Symfony **6.4 / 7.x / 8.x** (components declared in `composer.json`)
- Extensions: `dom`, `json`, `libxml`

Quick start
-----------

[](#quick-start)

```
composer require nowo-tech/html-to-word-bundle
```

Register `Nowo\HtmlToWordBundle\HtmlToWordBundle` if Flex does not, then add `config/packages/nowo_html_to_word.yaml` (see [Configuration](docs/CONFIGURATION.md)).

```
use Nowo\HtmlToWordBundle\Converter\HtmlToWordConverterInterface;
use Nowo\HtmlToWordBundle\Export\ExporterInterface;

$doc = $converter->convert($html);
return $exporter->toStreamResponse($doc);
```

Tests and coverage
------------------

[](#tests-and-coverage)

ScopeDetail**PHPUnit**`composer test` — unit tests under `tests/Unit`, integration tests under `tests/Integration` (minimal Symfony kernel in `tests/Fixtures/AppKernel.php`).**PHP lines**Run `composer test-coverage` for the console summary, or `composer coverage-check` (same report written to `coverage-output.txt`, **fails below 85%** global lines). Latest reported global line coverage: **~89%** (PCOV; a few defensive branches in exporters / image temp paths are marked `@codeCoverageIgnore` where impractical to hit in CI).CI runs tests, PHPStan, and PHP-CS-Fixer on push/PR (see `.github/workflows/ci.yml`).

Development
-----------

[](#development)

Use the root `Makefile` and `docker-compose.yml`:

```
make up
make qa
make release-check
```

The PHP Docker image installs extensions required by PHPWord (including **GD**). Demo apps live under `demo/` (see [docs/DEMO-FRANKENPHP.md](docs/DEMO-FRANKENPHP.md)).

Version information
-------------------

[](#version-information)

Stable releases are tagged on GitHub; upgrade notes are in [docs/UPGRADING.md](docs/UPGRADING.md) and [docs/CHANGELOG.md](docs/CHANGELOG.md).

Versioning
----------

[](#versioning)

This library follows [Semantic Versioning](https://semver.org/).

License
-------

[](#license)

Released under the [MIT License](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~18 days

Total

3

Last Release

42d ago

### Community

Maintainers

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

---

Top Contributors

[![HecFranco](https://avatars.githubusercontent.com/u/24323276?v=4)](https://github.com/HecFranco "HecFranco (8 commits)")

---

Tags

symfonyexporthtmlworddocxPhpWordwysiwygSymfony Bundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nowo-tech-html-to-word-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nowo-tech-html-to-word-bundle/health.svg)](https://phpackages.com/packages/nowo-tech-html-to-word-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M400](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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