PHPackages                             hamichen/opentbs-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. hamichen/opentbs-bundle

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

hamichen/opentbs-bundle
=======================

OpenTBS Bundle for ZF2 - create OpenOffice and Ms Office documents with ZF2

011PHP

Since Aug 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/hamichen/OpenTBSBundle)[ Packagist](https://packagist.org/packages/hamichen/opentbs-bundle)[ RSS](/packages/hamichen-opentbs-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

OpenTBSBundle for ZF2
=====================

[](#opentbsbundle-for-zf2)

This bundle is just a convenient way to use OpenTBS, all the credits go to , Skrol29 and the TinyButStrong team.

OpenTBS - create OpenOffice and Ms Office documents with PHP (and ZF2)

Introduction
------------

[](#introduction)

(Taken from [http://www.tinybutstrong.com/plugins/opentbs/tbs\_plugin\_opentbs.html](http://www.tinybutstrong.com/plugins/opentbs/tbs_plugin_opentbs.html))

OpenTBS is a PHP tool to produce any OpenOffice and Ms Office documents with templates.

OpenTBS can merge any OpenDocument and Open XML files. It autommatically reconize extensions: odt, ods, odg, odf, odm, odp, ott, ots, otg, otp, docx, xlsx, pptx. In fact it can merge any XML or Text file saved in a zip container (which is the case for both OpenDocuments and OpenXML documents).

What is special to OpenTBS:

- Design your templates directly with OpenOffice or MS Office.
- No exe file needed to merge documents.
- No temporary files needed to merge documents.
- Output directly as an http download, a new file on the disk, or as a string (for file attachment for example).
- Works with both PHP 4 and PHP 5.

Versions included
-----------------

[](#versions-included)

TinyButStrong - 3.9.0

OpenTBS - 1.9.4

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

[](#requirements)

- ZF2
- It is better to have the [Zlib](http://www.php.net/manual/en/book.zlib.php) extension enabled on your PHP installation. If it's not, [here is what to do](http://www.tinybutstrong.com/plugins/opentbs/tbs_plugin_opentbs.html#zlib).

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

[](#installation)

### Step 1: Download the bundle using composer

[](#step-1-download-the-bundle-using-composer)

Add the following in your composer.json:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/kipperlenny/opentbsbundle"
        }
    ],
    "require": {
        "hamichen/opentbs-bundle": "dev-master"
    }
}
```

Then download / update by running the command:

```
$ php composer.phar update hamichen/opentbs-bundle
```

Composer will install the bundle to your project's `vendor/Kipperlenny/opentbs-bundle` directory.

### Step 2: Add the bundle in your application.config.php

[](#step-2-add-the-bundle-in-your-applicationconfigphp)

```
'OpentbsBundle',
```

#### Now you can use the 'opentbs' service.

[](#now-you-can-use-the-opentbs-service)

Using OpenTBSBundle
-------------------

[](#using-opentbsbundle)

First you need to define the variables in your docx template (you can use any other supported document format).

```
... some text in a word file with a `[client.name]` variable ...

```

In TBS you always need a variable base `client` and a variable name `name`.

Then in your controller you need to get the OpenTBS service, load your template and merge the fields (eg. replace the teplate variables).

```
...
use OpentbsBundle\Factory\TBSFactory as TBS;
...

    $tbs = new TBS();
    $tbs->LoadTemplate('document.odt');
```

A note for onshow automatic variables: You could define your variables within the `onshow` base, (like `onshow.name`), but I would not recommend this practice for it will only work if you use GLOBAL variables.

### For more information ...

[](#for-more-information-)

read the TBS manual at

and the OpenTBS plugin documentation at [http://www.tinybutstrong.com/plugins/opentbs/tbs\_plugin\_opentbs.html](http://www.tinybutstrong.com/plugins/opentbs/tbs_plugin_opentbs.html)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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/c0acec8386988c742e99b348eb1fb8616c4b8a775e78be7572aa2fd3e7aee00f?d=identicon)[hamichen](/maintainers/hamichen)

---

Top Contributors

[![Kipperlenny](https://avatars.githubusercontent.com/u/563328?v=4)](https://github.com/Kipperlenny "Kipperlenny (8 commits)")[![hamichen](https://avatars.githubusercontent.com/u/2081191?v=4)](https://github.com/hamichen "hamichen (2 commits)")[![marcoleong](https://avatars.githubusercontent.com/u/119320?v=4)](https://github.com/marcoleong "marcoleong (1 commits)")[![mbence](https://avatars.githubusercontent.com/u/2600280?v=4)](https://github.com/mbence "mbence (1 commits)")

### Embed Badge

![Health badge](/badges/hamichen-opentbs-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/hamichen-opentbs-bundle/health.svg)](https://phpackages.com/packages/hamichen-opentbs-bundle)
```

###  Alternatives

[42coders/document-templates

Document template management package.

19940.0k](/packages/42coders-document-templates)[qipsius/tcpdf-bundle

A bundle to easily integrate TCPDF into Symfony

23749.5k](/packages/qipsius-tcpdf-bundle)[macopedia/magmi2

Magento Mass Importer 'Magmi' for Magento 2

11615.7k](/packages/macopedia-magmi2)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.4k](/packages/tarfin-labs-easy-pdf)[akeneo-labs/excel-connector-bundle

Akeneo PIM Excel connector bundle

166.4k](/packages/akeneo-labs-excel-connector-bundle)

PHPackages © 2026

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