Download the PHP package n1xez/php-stamp without Composer
On this page you can find all versions of the php package n1xez/php-stamp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download n1xez/php-stamp
More information about n1xez/php-stamp
Files in n1xez/php-stamp
Package php-stamp
Short Description The XSL-way templating library for MS Office Word DOCX documents.
License MIT
Homepage https://github.com/shadz3rg/php-stamp
Informations about the package php-stamp
PHPStamp
PHPStamp is a simple templating engine for XML-based Microsoft Word documents.
Library aims to provide native XML-way of templating for DOCX documents as an alternative to treating its content as a plain text for regex replacing, which has a lot of downsides.
Instead it tries to clean messy WYSIWYG-generated code and create reusable XSL stylesheet from document.
Some additional information:
(EN) https://redd.it/30conp
(RU) https://habr.com/ru/articles/244421/
Features
- Caching XSL template to filesystem for fast document render.
- Track document mode - generate and cache new template if original document was updated.
- Configurable brackets for placeholder tags.
- Basic extension system, which helps to generate content blocks such as Cells or ListItems.
Known issues
Values inserted into placeholder tags may be highlighted as incorrect by spellcheck, since library removes language attribute and MS Word tries to check it with system language.
Requirements
Library requires PHP 7.4+ with DOM, XSL, Zip extensions.
Installation
Install with Composer:
composer require shadz3rg/php-stamp
Usage
Template:
Result:
All versions of php-stamp with dependencies
ext-json Version *
ext-xsl Version *
ext-zip Version *
ext-dom Version *
shadz3rg/lexer Version ^1.0