wordContrl word文档管理工具
wordContrl
介绍
word文档管理工具,具有创建word文档、编辑word文档、将word文档转为文本等功能
软件架构
软件架构说明
安装教程
- xxxx
- xxxx
- xxxx
下载地址:git@gitee.com:netbycom/wordContrl.git
使用说明
require("wordControl/wordControl.php");1、创建word文档$wordControl = new wordControl();//创建段落$wordControl->createSection(function($wordSection){$wordSection->align("center")->spacing(1);$wordSection->createText(function($wordText){$wordText->text("word测试标题")->size(18)->font("华康标题宋W9(P)")->spacing(0);});});$wordControl->createSection(function($wordSection){$wordSection->align("center")->spacing(1);$wordSection->createText(function($wordText){$wordText->text("(2018年7月)")->size(16)->font('楷体')->color('#333333');});});$wordControl->createSection(function($wordSection){$wordSection->align("left");$wordSection->createText(function($wordText){$wordText->spacing(60)->text("大家好:");});});//创建公共样式$this->wordStyle = new wordStyle();$this->wordStyle->size(16)->font('仿宋_GB2312')->color('#ff0000')->spacing(16);//创建段落并定义为模板$wordControl->createSection(function($wordSection){$wordSection->align("left")->ind(2);$wordSection->createText(function($wordText){$wordText->style($this->wordStyle)->text("测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容");});})->createTemplate('content');//创建段落并定义为模板$wordControl->createSection(function($wordSection){$wordSection->align("left")->ind(2);$wordSection->createText(function($wordText){$wordText->style($this->wordStyle)->color("#00ff00")->text("测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容");});})->createTemplate('content1');//使用模板并设定内容$wordControl->templateText('content','我是模板内容我是模板内容我是模板内容我是模板内容我是模板内容我是模板内容我是模板内容我是模板内容');//使用模板并设定内容$wordControl->templateText('content1','测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容');$wordControl->createSection(function($wordSection){$wordSection->align("left")->ind(2);$wordSection->createText(function($wordText){$wordText->text("表格标题:")->font('黑体')->size(16)->spacing(0)->bold();});});//创建表格$wordControl->createTable(function($wordTable){//设置表格边框样式$wordTable->borders(function($wordTableBorders){$wordTableBorders->get('left')->size('10')->color("ff0000");$wordTableBorders->get('right')->size('10')->color("ff0000");$wordTableBorders->get('top')->size('10')->color("00ff00");$wordTableBorders->get('bottom')->size('10')->color("00ff00");});//创建表格行$wordTable->createRow(function($wordTableRow){//创建表格列$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("姓 名")->bold();});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("出生日期")->bold();});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("年 龄")->bold();});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("课 程")->bold();});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("得 分")->bold();});});});});//创建表格行并为此行创建模板$wordTable->createRow(function($wordTableRow){$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("学生1")->color("#ff0000");});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("2015-01-02");})->align('center');});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("3");});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("语文")->bold()->underline();});});});$wordTableRow->createCell(function($wordTableCell){$wordTableCell->width(1000);$wordTableCell->createSection(function($wordSection){$wordSection->createText(function($wordText){$wordText->text("100")->color("#00ff00");});});});})->createTemplate('row');//使用表格行模板创建行$wordTable->templateText('row',array('学生3','2015-01-05','3','数学','98'));$wordTable->templateText('row',array('学生4','2015-01-06','3','数学1','100'));$wordTable->templateText('row',array('学生5','2015-01-07','3','数学3','94'));});//使用模板并设定内容$wordControl->templateText('content1','内容结尾内容结尾内容结尾内容结尾内容结尾内容结尾内容结尾内容结尾内容结尾内容结尾内容结尾');//生成表格并下载$wordControl->createXML()->save("123.docx")->output();2、修改word文档//解析word文档$wordSections = $wordControl->load('./temp.docx')->parseWord();//获取所有段落对象列表$wordSectionList = $wordSections->getWordSectionLists();$wordSection = $wordSections->getWordSectionItem(0)['section']; //获取指定的段落对象$wordText = $wordSection->getTextsObj()[0]->text("新的文本内容"); //获取段落对象下面的文本对象并设置新的内容$wordSection->updateText($wordText); //修改段落对象下面的文本内容$wordSection->replaceText('新闻坊','新闻观察'); //替换段落对象下面的文本内容$wordControl->createXML()->save("1234.docx")->output(); //生成修改后的文档并下载3、解析word文档返回文本//解析word文档$wordSectionTexts = $wordControl->load('./temp.docx')->parseWord()->getWordSections();
wordContrl word文档管理工具相关推荐
- 接口文档管理工具showDoc
随着互联网的发展,前后端分离已成为互联网项目开发的业界标准使用方式. 由此而产生的前端开发工程师和后端开发工程师的沟通效率问题. 推荐一个应此而生的文档管理工具---showdoc showdoc官网 ...
- php编写文件管理工具,php之markdown文档管理工具的实现代码
本文主要和大家分享php之markdown文档管理工具的实现代码,希望能帮助到大家. 主要目标: 1.可以多人编辑 2.可以在浏览器中查看 3.有一个可以折叠的目录 4.支持多级目录 5.支持mark ...
- 云效知识库 Thoughts,企业文档管理工具
云效知识库 Thoughts,企业文档管理工具,云效知识库是一款企业 知识管理 工具,通过独立的知识库空间,结构化地组织在线协作文档,实现企业知识的积累和沉淀,促进知识的高度复用和流通. 云效知识库是 ...
- Github每日精选(第5期):文档管理工具paperless-ngx和dzzoffice
Paperless-ngx Paperless-ngx是一种文档管理系统,它将您的物理文档转换为可搜索的在线档案,因此您可以保留更少的纸张. 部署无纸化的最简单方法是docker compose.do ...
- 基于WPF重复造轮子,写一款数据库文档管理工具(一)
项目背景 公司业务历史悠久且复杂,数据库的表更是多而繁杂,每次基于老业务做功能开发都需要去翻以前的表和业务代码.需要理解旧的表的用途以及包含的字段的含义,表少还好说,但是表一多这就很浪费时间,而且留下 ...
- 你还在用收费的文档管理工具?我这有更牛逼的选择!完全免费
点关注公众号,回复"1024"获取2TB学习资源! 今天给大家分享一款免费开源的在线文档管理工具 MinDoc ,提升 IT 部门的文档管理效率. 概述 MinDoc 是一款针对 ...
- 在线文档管理工具都有什么值得推荐的?
在线文档管理工具是现代企业和个人必备的工具之一,它们可以帮助用户方便地创建.编辑.共享和管理文档. 几个值得推荐的在线文档管理工具: Google 文档:Google 文档是一款免费的在线文档工具,它 ...
- Yep for Mac:专为Mac用户所设计的文档管理工具
Yep for mac是一款实用的文件管理工具,相当于各种文件(PDF.DOC.Excel.PPT等)的一个iPhoto.Yep for mac能自动组织整理PDF.iWork.office等文件,归 ...
- 盘点 8 款好用的 API 接口文档管理工具
随着互联网的普及和发展,API 接口已经无处不在.它已经在 Web 应用程序.移动应用程序.云计算.物联网.人工智能等领域中得到广泛应用. 例如,在金融行业中,API 接口可以被用于构建支付服务.银行 ...
最新文章
- 容器管理大战:Kubernetes vs.Docker Swarm与Amazon ECS
- CNN中的采样和池化心得
- 学python有哪些书推荐-有哪些Python学习路线值得推荐?线路及书籍推荐都在这里...
- 解决eclipse中Mybatis框架下sql语句执行后控制台不显示日志问题
- arduino pmw 串口 字符串_ESP32 Arduino开发:串口(Serial port)
- python中view的用法_APIview使用
- Linux samba的配置和使用
- redhat6.5配置阿里云yum源
- dell R710 更换raid卡后,raid卡信息没有了,处理方案
- 离散数学--命题逻辑(一)
- 重磅推荐!5 款强大的开源报表工具
- 几何分布的期望和方差公式推导_学习笔记:几种特殊分布之间的关系
- WiFi通信字节乱码问题的产生原因及解决方法
- Jumping NLP Curves: A review of NLP research (翻译)
- 庸科科沾稚尘悦蕉谷捉
- mysql数据库加锁语句_sql语句对数据库表进行加锁和解锁
- 2016年头条校招笔试题
- 快应用开发中常见的几个版本号~~
- pip的安装,更新,卸载模块以及使用方法 python
- 什么是AP,什么是CP,什么是CAP?