2017 © Pedro Peláez
 

library docxmustache

docx template manipulation class, based on mustache templating language

image

wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  • Wednesday, May 30, 2018
  • by wrklst
  • Repository
  • 4 Watchers
  • 9 Stars
  • 200 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 3 Open issues
  • 35 Versions
  • 20 % Grown

The README.md

DocxMutache Logo, (*1)

DocxMustache for Laravel 10.x.

Software License Quality Score Build Status StyleCI, (*2)

Docx template manipulation class for Laravel 10.x, based on mustache templating language. This class is still under heavy development and works more like proof of concept at the moment. Things will change quickly and might break things., (*3)

Template Example in Word This package helps you to use docx files with mustache syntax as templates to merge richly styled documents with information from any data source. It can replace text and images and supports basic html styling (bold, itallic, underline)., (*4)

Installation

composer require wrklst/docxmustache, (*5)

Please check depencies down below and examples folder for configuration and usage., (*6)

HTML conversion

Current HTML conversion is basic and only supports singular runs of bold, italic and underlined text and no combination of these. It requires all values non html to be escaped with htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); and a prefix of *[[DONOTESCAPE]]* so the class knows not to escape the html before it is converted to openXML., (*7)

Replacing images

The image needs to be a reachable URL with a image in a supported format. The url value needs to be placed into the alt text description field of the image. Images will be resampled to the constraints of the placeholder image. The Image value needs to be formated the with pseudo tags around, such as: [IMG-REPLACE]http://placehold.it/350x150[/IMG-REPLACE], (*8)

Example

Please also checkout the example in the example folder to get a basic understand of how to use this class., (*9)

DOCX to PDF conversion

Conversion to PDF requires libreoffice-common to be installed on the server (used for conversion). Use sudo apt install libreoffice-common on your ubuntu/debian based server. Also install ttf-mscorefonts if you need support for Arial font when converting docx documents to pdf sudo apt-get install ttf-mscorefonts-installer, (*10)

Other Dependencies

The package is dependent on several Laravel specific functions. It could easily be ported to other frameworks or be ported to be framework agnostic. In addition to the Laravel dependency, the page uses the following packages:, (*11)

Laravel specific dependencies (only relevant if ported into non Laravel environment):, (*12)

Contributions

If you would like to contribute something to this package, please feel free to make a pull request and a corresponding issue and we will be happy to review and discuss., (*13)

Why another openXML / docx template solution?

There are some classes out there that help with writing and or changing the content of word documents, some with commercial licenses and some free. For our particular purpose we did not need most of the features many of the libraries out there have – we needed a simple solution that would allow to replace values and images and traverse through data in a easy and straightforward manner., (*14)

Many of the other libraries use cloning to repeat a block with some custom templating syntax instead of using a existing template syntax. We use the usual mustache syntax, also to achieve repeating content in as many dimensions as needed., (*15)

Other PHP Classes to manipulate openXML word documents:, (*16)

The Versions

30/05 2018

dev-master

9999999-dev https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

30/05 2018

v0.0.26

0.0.26.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

29/05 2018

v0.0.25

0.0.25.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

29/05 2018

v0.0.24

0.0.24.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

19/02 2018

v0.0.23

0.0.23.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

19/02 2018

v0.0.22

0.0.22.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

17/02 2018

v0.0.21

0.0.21.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

20/12 2017

v0.0.20

0.0.20.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

16/11 2017

v0.0.19

0.0.19.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

15/11 2017

v0.0.18

0.0.18.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

03/11 2017

v0.0.16

0.0.16.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

03/11 2017

v0.0.17

0.0.17.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

03/11 2017

dev-analysis-qgEPn4

dev-analysis-qgEPn4 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

03/11 2017

v0.0.15

0.0.15.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

02/11 2017

v0.0.14

0.0.14.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

21/10 2017

v0.0.13

0.0.13.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

19/10 2017

v0.0.12

0.0.12.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

26/09 2017

v0.0.11

0.0.11.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

13/09 2017

v0.0.10

0.0.10.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

12/09 2017

v0.0.9

0.0.9.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

12/09 2017

v0.0.8

0.0.8.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

15/07 2017

v0.0.7

0.0.7.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

04/07 2017

v0.0.6

0.0.6.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

04/07 2017

v0.0.5

0.0.5.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

01/07 2017

v0.0.4

0.0.4.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

01/07 2017

dev-analysis-XVO63w

dev-analysis-XVO63w https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

31/05 2017

v0.0.3

0.0.3.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

24/05 2017

v0.0.2

0.0.2.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

22/05 2017

dev-analysis-qByp9V

dev-analysis-qByp9V https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

08/05 2017

v0.0.1

0.0.1.0 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

08/05 2017

dev-analysis-8PrVJ9

dev-analysis-8PrVJ9 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

08/05 2017

dev-analysis-8mMj7a

dev-analysis-8mMj7a https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

07/05 2017

dev-scrutinizer-patch-3

dev-scrutinizer-patch-3 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

07/05 2017

dev-scrutinizer-patch-2

dev-scrutinizer-patch-2 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx

07/05 2017

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1 https://github.com/wrklst/docxmustache

docx template manipulation class, based on mustache templating language

  Sources   Download

MIT

The Requires

 

by Tobias Vielmetter-Diekmann

laravel template php mustache openxml docx