All Projects → mkdreams → MDword

mkdreams / MDword

Licence: other
A pure PHP library for change word processing documents. OFFICE WORD Dynamic data binding data generation report. Generate awesome word(docx) with template

Programming Languages

PHP
23972 projects - #3 most used programming language
Dockerfile
14818 projects

Labels

Projects that are alternatives of or similar to MDword

PoC-ActiveX
PoC ActiveX SVG Document Execution
Stars: ✭ 21 (-4.55%)
Mutual labels:  office
Office2PDF
Office 文件(Word、Excel、PPT)批量转为 PDF 文件,文档完善,自用满意
Stars: ✭ 114 (+418.18%)
Mutual labels:  office
eec
A fast and lower memory excel write/read tool.一个非POI底层,支持流式处理的高效且超低内存的Excel读写工具
Stars: ✭ 93 (+322.73%)
Mutual labels:  office
lazyExcel
a simply software like MS-Excel.it can be running muiti-platform...
Stars: ✭ 37 (+68.18%)
Mutual labels:  office
eoffice
Export and import graphics and tables to MicroSoft office
Stars: ✭ 19 (-13.64%)
Mutual labels:  office
VisioAutomation
Automate Microsoft Visio with .NET
Stars: ✭ 88 (+300%)
Mutual labels:  office
FritzBoxTelefon-dingsbums
Das Fritz!Box Telefon-dingsbums ist ein Outlook-Addin, welches ein direktes Wählen der Kontakte aus Outlook ermöglicht. Zusätzlich bietet es nützliche Funktionen, wie einen Anrufmonitor oder eine Rückwärtssuche.
Stars: ✭ 16 (-27.27%)
Mutual labels:  office
Office2019VL
Deploy Office 2019 ProPlus(VL)
Stars: ✭ 75 (+240.91%)
Mutual labels:  office
OfficeManagementSystem
A system that helps to perform day to day activities of an office including attendance management, task management, leave management, complaint management, etc.
Stars: ✭ 32 (+45.45%)
Mutual labels:  office
pdftron-android-samples
PDFTron Android Samples
Stars: ✭ 30 (+36.36%)
Mutual labels:  office
OotD
Outlook on the Desktop (OotD)
Stars: ✭ 76 (+245.45%)
Mutual labels:  office
utools-recent-projects
uTools 插件, 快速查询最近打开的项目
Stars: ✭ 84 (+281.82%)
Mutual labels:  office
Golang-Files-Preview
Golang 文件预览支持 office\pdf\cad\achieve\txt\image\video files
Stars: ✭ 53 (+140.91%)
Mutual labels:  office
Spreadsheet
A spreadsheet app designed for elementary OS
Stars: ✭ 66 (+200%)
Mutual labels:  office
FuckingClippy
The standalone assistant
Stars: ✭ 22 (+0%)
Mutual labels:  office
Office365FiddlerExtension
This Fiddler Extension is an Office 365 centric parser to efficiently troubleshoot Office 365 client application connectivity and functionality.
Stars: ✭ 23 (+4.55%)
Mutual labels:  office
OfficeExtractor
Extracts embedded OLE objects from Word, Excel, PowerPoint, Open Office and RTF files without needing the original programs
Stars: ✭ 67 (+204.55%)
Mutual labels:  office
modern-office-git-diff
An experiment in tracking and diffing versions of modern Microsoft Office files in Git.
Stars: ✭ 51 (+131.82%)
Mutual labels:  office
JThumbnail
Java thumbnail generator for Office,PDF,HTML,Text,MP3,MPEG and Image documents
Stars: ✭ 24 (+9.09%)
Mutual labels:  office
hadoopoffice
HadoopOffice - Analyze Office documents using the Hadoop ecosystem (Spark/Flink/Hive)
Stars: ✭ 56 (+154.55%)
Mutual labels:  office

MDword

中文文档

Project General Name

Template: a word which will be revised.
Block: the part which will be replaced or cloned.

Project Introduction

Main Use: to generate word dynamically.
Advantage: focus only on dynamic data and logic, rather than adjusting the style, which can modulate the template with the help of office word.

Comparison between MDword & PHPword

  • Similarities

  1. PHP Package.
  2. Both can be used to generate office word.
  • Differences

  1. PHPword concentrates on writing elements one by one. However, it is more powerful and efficient for Mdword just to revise them on the template.
  2. For updating text styles, adding covers, headers and footers, MDword just modifies the template by office word, while PHPword complicate the task-adjusting every element.
  3. Directories(Table of content) can be automatically generated.

Tutotials

  • Installation

// Method 1
composer require mkdreams/mdword
// Method 2, Autoloading Template
require_once('Autoloader.php');
  • Add annotations or use “${value/}” to the template. Please note that there is a “/” at the end.

image

// New class,load template
$TemplateProcessor = new WordProcessor();
$template = 'temple.docx';
$TemplateProcessor->load($template);

// Set Value
$TemplateProcessor->setValue('value', 'r-value');

// Clone 
$TemplateProcessor->clones('people', 3);

$TemplateProcessor->setValue('name#0', 'colin0');
$TemplateProcessor->setValue('name#1', [
    ['text'=>'colin1','style'=>'style','type'=>MDWORD_TEXT],
    ['text'=>1,'type'=>MDWORD_BREAK],
    ['text'=>'86','style'=>'style','type'=>MDWORD_TEXT]
]);
$TemplateProcessor->setValue('name#2', 'colin2');

$TemplateProcessor->setValue('sex#1', 'woman');

$TemplateProcessor->setValue('age#0', '280');
$TemplateProcessor->setValue('age#1', '281');
$TemplateProcessor->setValue('age#2', '282');

// set value for image
$TemplateProcessor->setImageValue('image', dirname(__FILE__).'/logo.jpg');

// Delete a paragraph
$TemplateProcessor->deleteP('style');

// Save
$rtemplate = __DIR__.'/r-temple.docx';
$TemplateProcessor->saveAs($rtemplate);
  • Result

image

  • GIFs

image

More samples

Communication

Note: Exchange idea on MDword.

image

Project Plans

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].