PHP Classes

PHP MS Word Template Engine: Create and convert document from MS Word template

Recommend this page to a friend!
  Info   View files Example   Demos   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-07-21 (9 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 93 This week: 1All time: 9,677 This week: 174Up
Version License PHP version Categories
word-template-engine 1.0.2Custom (specified...7.1Files and Folders, Printing, Templates, P...
Description Author

This package can create and convert documents from MS Word template.

It can load and parse template files in Microsoft Word DOCX format to replace values of document properties and template placeholder marks with given template parameter values.

It can also replace and delete images, manage document pages, create document copies, copy pages inside the document, or add rows to your tables.

The processed template document can be converted into documents in other formats using LibreOffice like: PDF, HTML, XHTML, HTML adapted for email.

Recommendations

I need a PHP class for create word document
Want a simple solution also for images

Picture of Philip Sorokin
  Performance   Level  
Name: Philip Sorokin <contact>
Classes: 1 package by
Country: Russian Federation Russian Federation

Details

Word Template Engine

Word Template Engine is a PHP based template processor and converter that allows to create documents from DOCX templates (download an example.docx) and convert them trough LibreOffice into the following formats: PDF, HTML, XHTML, mail-adapted HTML. This light-weight library will help you in creating invoices, contracts, waylists and other documents. Use variables inside your document and substitute them with values on the server side, replace and delete images, manage document sections (pages), make a document copy or a section copy inside the document, add rows to your tables. Output the documents to a user browser, attach the WORD or PDF files to emails, or create a HTML mail content from your template.

Documentation and examples: https://addondev.com/opensource/word-template-engine

Changelog

[1.0.1] - 2021-07-19

  • Improved performance of processing large documents. More than 1000 variable replacements take a few seconds. Reduced memory and CPU usage. Speed increased by 6-8 times.

[1.0.2] - 2021-07-21

  • Fixed directory separators caused issues on Windows platform.
  • Generation of unique temporary subdirectory to resolve potential multiuser conflicts.
  Documentation and examplesExternal page  
  Files folder image Files  
File Role Description
Files folder imageexamples (1 file, 1 directory)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Plain text file WordTemplateEngine.php Class Class source

  Files folder image Files  /  examples  
File Role Description
Files folder imageimg_samples (3 files)
  Accessible without login Plain text file examples.php Example Example class source

  Files folder image Files  /  examples  /  img_samples  
File Role Description
  Accessible without login Image file jd_signature.png Icon Icon image
  Accessible without login Image file logo.png Icon Icon image
  Accessible without login Image file xx_signature.png Icon Icon image

 Version Control Unique User Downloads Download Rankings  
 100%
Total:93
This week:1
All time:9,677
This week:174Up
For more information send a message to info at phpclasses dot org.