2017 © Pedro Peláez
 

library phpword

PHPWord is a library written in PHP that create word documents.

image

teqneers/phpword

PHPWord is a library written in PHP that create word documents.

  • Friday, February 9, 2018
  • by sgehrig
  • Repository
  • 5 Watchers
  • 0 Stars
  • 7,729 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

PHPWord

This repository is an source code of PHPWord, turned into Composer package. This repository is forked from ferdynator., (*1)

Installation

All you have to do is to get composer and add following lines to your composer.json:, (*2)

    "require": {
       "teqneers/phpword": "*"
    }

Examples

CantSplit in Tables

Prevents the splitting of a table row if the content does not fit on the page. The whole row moves to a new page. See http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.cantsplit(v=office.14).aspx, (*3)

...
$wordTable = $section->addTable('tableStyle');
$wordTable->setCantSplit(true);
...

Usage of tab stops

addParagraphStyle('multipleTab', array(
    'tabs' => array(
        new PHPWord_Style_Tab("left", 1550),
        new PHPWord_Style_Tab("center", 3200),
        new PHPWord_Style_Tab("right", 5300)
    )
));

$PHPWord->addParagraphStyle('rightTab', array(
    'tabs' => array(
        new PHPWord_Style_Tab("right", 9090)
    )
));

$PHPWord->addParagraphStyle('centerTab', array(
    'tabs' => array(
        new PHPWord_Style_Tab("center", 4680)
    )
));

// New portrait section
$section = $PHPWord->createSection();

// Add listitem elements
$section->addText("Multiple Tabs:\tOne\tTwo\tThree", NULL, 'multipleTab');
$section->addText("Left Aligned\tRight Aligned", NULL, 'rightTab');
$section->addText("\tCenter Aligned",            NULL, 'centerTab');

// Save File
$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
$objWriter->save('TabStops.docx');
?>

The Versions

09/02 2018

dev-master

9999999-dev http://phpword.codeplex.com

PHPWord is a library written in PHP that create word documents.

  Sources   Download

LGPL-3.0 GNU

The Requires

  • php >5.2.0

 

word doc docx

26/08 2014

dev-table_cant_split

dev-table_cant_split http://phpword.codeplex.com

PHPWord is a library written in PHP that create word documents.

  Sources   Download

GNU

The Requires

  • php >5.2.0

 

word doc docx

21/02 2014

dev-unicode_fix

dev-unicode_fix http://phpword.codeplex.com

PHPWord is a library written in PHP that create word documents. This Package is modified to work with Symfony 2

  Sources   Download

GNU

The Requires

  • php >5.2.0

 

symfony2 word doc docx

24/01 2014

dev-tabstops

dev-tabstops http://phpword.codeplex.com

PHPWord is a library written in PHP that create word documents.

  Sources   Download

GNU

The Requires

  • php >5.2.0

 

word doc docx

23/01 2014

dev-left_indentation

dev-left_indentation http://phpword.codeplex.com

PHPWord is a library written in PHP that create word documents.

  Sources   Download

GNU

The Requires

  • php >5.2.0

 

word doc docx

21/01 2014

dev-pagebreak_fix

dev-pagebreak_fix http://phpword.codeplex.com

PHPWord is a library written in PHP that create word documents.

  Sources   Download

GNU

The Requires

  • php >5.2.0

 

word doc docx