PHPackages                             ntlab/rtftree - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ntlab/rtftree

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ntlab/rtftree
=============

PHP Library for RTF processing

v1.0.1(3y ago)02141MITPHPPHP &gt;=7.1

Since Feb 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tohenk/php-rtftree)[ Packagist](https://packagist.org/packages/ntlab/rtftree)[ Docs](https://github.com/tohenk/php-rtftree)[ RSS](/packages/ntlab-rtftree/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

PHP RTF Tree
============

[](#php-rtf-tree)

PHP Library for RTF processing, port of nrtftree ().

This is work in progress with some additional feature:

- Introduce new white space node type to preserve the original rich text document loaded.
- ReplaceTextEx can replace text which is scattered across nodes.
- Rtf document with measurement unit support (native, mm, cm, inch, pixel).

REQUIREMENT
-----------

[](#requirement)

- PHP 5.3+

CLASSES
-------

[](#classes)

There are 3 main classes for RTF processing.

### NTLAB\\RtfTree\\Node\\Tree

[](#ntlabrtftreenodetree)

The RTF tree parser, able to parse RTF document into tree nodes, perform selects the nodes based on keyword, perform search and replace of the plain text, and convert back the nodes as RTF code.

### NTLAB\\RtfTree\\Document\\Document

[](#ntlabrtftreedocumentdocument)

RTF tree with additional document entity handler, such as colors, fonts, stylesheets, and objects.

### NTLAB\\RtfTree\\Builder\\Builder

[](#ntlabrtftreebuilderbuilder)

RTF tree builder.

TODO
----

[](#todo)

- Rtf Merger
- Examples

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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 ~462 days

Total

2

Last Release

1454d ago

### Community

Maintainers

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

---

Top Contributors

[![tohenk](https://avatars.githubusercontent.com/u/350747?v=4)](https://github.com/tohenk "tohenk (35 commits)")

---

Tags

parserrtftext-processingrichtext

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ntlab-rtftree/health.svg)

```
[![Health](https://phpackages.com/badges/ntlab-rtftree/health.svg)](https://phpackages.com/packages/ntlab-rtftree)
```

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k902.6M1.8k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k910.8M118](/packages/doctrine-lexer)[erusev/parsedown

Parser for Markdown.

15.0k151.8M727](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M700](/packages/league-commonmark)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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