2017 © Pedro Peláez
 

library phpword

Based on PHPOffice/PHPWord, some code modification for Any Image in Document to be recognized in TemplateProcessor

image

superipey/phpword

Based on PHPOffice/PHPWord, some code modification for Any Image in Document to be recognized in TemplateProcessor

  • Friday, December 8, 2017
  • by superipey
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Modified PHPWord

This is only Modified PHPWord library based on PHPOffice/PHPWord library. I just put some modification in Word TemplateProcessor to recognize Images as a Template in the Document., (*1)

Thank you, (*2)

Installation

This library is installed via Composer. To add a dependency to PHPWord in your project, either, (*3)

Run the following to use the latest master version, (*4)

    composer require superipey/phpword:dev-master

You can of course also manually edit your composer.json file, (*5)

{
    "require": {
       "superipey/phpword": "dev-master"
    }
}

Getting Started

First Step

To try this library modification, first create the template with the image placed anywhere in your document, right click on the image, then select Format AutoShape/Pictures Figure 1, (*6)

Second Step

Type your fieldname in the Alternative text Figure 2, (*7)

Third Step

Use setImageValueAlt to set the image, (*8)

$template->setImageValueAlt(field, path-to-file);

Example:, (*9)

$template->setImageValueAlt("foto", "./uploads/foto/ferry.png");

License

PHPWord is an open source project licensed under the terms of LGPL version 3. PHPWord is aimed to be a high quality software product by incorporating continuous integration and unit testing. You can learn more about PHPWord by reading the Developers' Documentation and the API Documentation., (*10)

The Versions

08/12 2017

dev-master

9999999-dev http://phpoffice.github.io

Based on PHPOffice/PHPWord, some code modification for Any Image in Document to be recognized in TemplateProcessor

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

template php html pdf writer openxml reader word doc office odt docx phpoffice odf ooxml rtf phpword office open xml iso iec 29500 wordprocessingml rich text format opendocument template processor