PHPackages                             cristiangomeze/template - 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. [Templating &amp; Views](/categories/templating)
4. /
5. cristiangomeze/template

ActiveLibrary[Templating &amp; Views](/categories/templating)

cristiangomeze/template
=======================

Convert word templates to pdf

v0.0.12(4y ago)0135MITPHP

Since Apr 14Pushed 4y agoCompare

[ Source](https://github.com/cristiangomeze/Template)[ Packagist](https://packagist.org/packages/cristiangomeze/template)[ Docs](https://github.com/cristiangomeze/template)[ RSS](/packages/cristiangomeze-template/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (13)Used By (0)

Template
========

[](#template)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c413a63e09b2f784a83c41348826af3574294c423f34d02d4f010c060e599335/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637269737469616e676f6d657a652f74656d706c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cristiangomeze/template)[![Total Downloads](https://camo.githubusercontent.com/a1f6d781590049218417372ca76c12883fe06dc3b50e73f9115b1771659c571b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f637269737469616e676f6d657a652f74656d706c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cristiangomeze/template)

This is a wrapper to use the [phpword template](https://phpword.readthedocs.io/en/latest/templates-processing.html), which allows you to have the final document rendered in the browser. Take a look at [contributing.md](contributing.md) to see a to do list.

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

[](#installation)

Via Composer

```
$ composer require cristiangomeze/template
```

Usage
-----

[](#usage)

```
use Cristiangomeze\Template\Template;

$values = [
          'firstname' => 'John',
          'lastname' => 'Doe'
];

$valuesImages = [
    'company_logo' => [
        'path' => '/home/user/wallpaper/wallpaper.png',
        'width' => 200,
        'height' => 200,
        'ratio' => false
    ]
];

return Template::make('/home/user/any_word_document.docx')
        ->addValues($values)
        ->addImages($valuesImages)
        ->preview();
```

```
use Cristiangomeze\Template\Transforms\Transform;

$values = [
    [
        'key' => 'fecha',
        'value' => '2019-08-08',
        'transforms' => ['DateWords'] // DateWords, NumberWords, NumericFormat:2, DateFormat:LLLL
    ]
];

Transform::make($values)->toArray();

// 'fecha' => 'Ocho (8) Días del mes de Agosto del año Dos Mil Diecinueve (2019)'
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [author name](https://github.com/cristiangomeze)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~61 days

Recently: every ~143 days

Total

12

Last Release

1593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55845f137fb6e88d99afdcb38554a8777bc67f7c11689ec94d4eef23a21b836c?d=identicon)[thepany96](/maintainers/thepany96)

---

Top Contributors

[![cristiangomeze](https://avatars.githubusercontent.com/u/19762300?v=4)](https://github.com/cristiangomeze "cristiangomeze (28 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

laraveltemplate

### Embed Badge

![Health badge](/badges/cristiangomeze-template/health.svg)

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M295](/packages/laravel-horizon)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.3k453.6k30](/packages/tightenco-jigsaw)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M159](/packages/spatie-laravel-health)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[moonshine/moonshine

Laravel administration panel

1.3k253.1k78](/packages/moonshine-moonshine)[illuminate/queue

The Illuminate Queue package.

21332.6M1.5k](/packages/illuminate-queue)

PHPackages © 2026

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