承接 irebega/docx-replacer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

irebega/docx-replacer

最新稳定版本:v1.1.0

Composer 安装命令:

composer require irebega/docx-replacer

包简介

PHP extension that allow you replace text to text or text to image in DOCX file

README 文档

README

Latest Version on Packagist Software License Total Downloads

Extention is no longer supported.

Docx format has so much unconsistency in their xml files and I just can't predict every case. You still can use extension, but on your own risk.

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);

If you want search to be case insensitive use replaceTextInsensitive like:

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

$docx->replaceTextInsensitive($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

统计信息

  • 总下载量: 29.94k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-19