Registry / serialization / phpoffice-phpword

phpoffice-phpword

JSON →
library1.4.0phppackagistunverified

A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF).

composer require phpoffice/phpword
INSTALL
IMPORT
SIG · PHPOFFICE-PHPWORD
P
phpoffice-phpword
serializationphpv1.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PhpWord
use PhpOffice\PhpWord\PhpWord;

Create a new document and save as .docx.

use PhpOffice\PhpWord\PhpWord; $phpWord = new PhpWord(); $section = $phpWord->addSection(); $section->addText('Hello World!'); $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007'); $objWriter->save('helloWorld.docx');
Debug
Known issues
gotchaLarge documents may consume significant memory.
fix
Use streaming or chunk processing for large files.
affects: >=1.0.0
Upgrade
Version history
1.4.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
phpoffice-phpword — pip install phpoffice-phpword · libregistry