jupitern / docx
docx tools - template engine, merge docx files
Installs: 100 782
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 3
Forks: 4
Open Issues: 2
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-11-17 14:58:35 UTC
README
PHP Docx tolls.
- docx template system
- merge docx files on one file
- optionally add page break between merged files
Requirements
PHP 5.4 or higher.
Installation
Include jupitern/docx in your project, by adding it to your composer.json file.
{ "require": { "jupitern/docx": "1.*" } }
Usage
$dir = 'C:\\www\\docx\\'; // Docx template $docx = \Jupitern\Docx\Docx::instance() ->setTemplate($dir.'template.docx') ->setData(['{name}' => 'john doe', '{address}' => 'at the end of the road']) ->save($dir.'result.docx'); // Merge Docx files $docxMerge = \Jupitern\Docx\DocxMerge::instance() // add array of files to merge ->addFiles([$dir.'file1.docx', $dir.'file2.docx']) // output filepath and pagebreak param ->save($dir.'result.docx', true);
Contributing
- welcome to discuss a bugs, features and ideas.
License
jupitern/docx is release under the MIT license.
You are free to use, modify and distribute this software