Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.39 KB

readme.md

File metadata and controls

47 lines (30 loc) · 1.39 KB

PHP .docx replacer

Latest Version on Packagist Software License Total Downloads

Replace your variables to text or even to images in .docx files

Install

Require this package with composer using the following command:

composer require irebega/docx-replacer

Text to text replace

This code will replace $search to $replace in $pathToDocx file

$docx = new IRebega\DocxReplacer\Docx($pathToDocx);

$docx->replaceText($search, $replace);

Text to image replace

This code will replace text $search to image that are located in $path in $pathToDocx file

$docx = new IRebega\DocxReplacer\Docx($pathToDocx);

$docx->replaceTextToImage($search, $path);

License

PHP .docx replacer is open-sourced software licensed under the MIT license