Download the PHP package dskripchenko/php-docx-phpword without Composer
On this page you can find all versions of the php package dskripchenko/php-docx-phpword. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dskripchenko/php-docx-phpword
More information about dskripchenko/php-docx-phpword
Files in dskripchenko/php-docx-phpword
Package php-docx-phpword
Short Description Typed bridge between PHPWord and dskripchenko/php-docx: export PhpWord objects to clean HTML, import HTML into PhpWord, read arbitrary DOCX straight into PhpWord models, detect template variables. The HTML layer for PHPWord pipelines.
License MIT
Homepage https://github.com/dskripchenko/php-docx-phpword
Informations about the package php-docx-phpword
dskripchenko/php-docx-phpword
The HTML layer for PHPWord pipelines. A typed bridge between PHPWord's object model and php-docx's AST β export
PhpWordobjects to clean HTML (the export PHPWord doesn't offer), import HTML intoPhpWord, read arbitrary DOCX straight into PHPWord models, detect template variables. Keep working in the API you know.π English Β· δΈζ
Installation
Brings dskripchenko/php-docx (MIT, zero-dep) next to your existing
phpoffice/phpword. This package is MIT; PHPWord stays LGPL-3.0 β a
regular Composer dependency, nothing about your code changes.
What you get
PhpWord β HTML (the killer feature)
HTML β PhpWord
Read any DOCX into PhpWord objects
Uses php-docx's reader (full style cascade, Word / Google Docs / LibreOffice / PHPWord output β fidelity is tracked on an external corpus), then maps into PHPWord models. PHPWord's own reader is not involved.
Detect template variables
AST escape hatches
PhpWordBridge::toDocument($phpWord) and
PhpWordBridge::fromDocument($document) expose the underlying mapping
for pipelines that continue in php-docx.
The shared element set (the honest boundary)
The bridge maps what both models can express:
| Carried across | Not carried (skipped, never guessed) |
|---|---|
| paragraphs, text runs (bold, italic, underline, strikethrough, super/subscript, colour, size, font name) | named/theme styles (resolved values only) |
| headings 1β6 | charts, TOC, checkboxes, OLE |
tables incl. gridSpan / vMerge |
tracked changes, comments |
| bullet / numbered lists (nested) | footnotes/endnotes, OMML math |
| hyperlinks, images, line/page breaks | form fields |
| default headers/footers | first/even header variants, watermarks |
| paragraph alignment, spacing, indents | section/page geometry details |
If a document leans on the right-hand column, the bridge will not pretend otherwise β content outside the set is dropped silently by design. For full-fidelity DOCX round-trips stay in php-docx itself.
License
MIT. Depends on phpoffice/phpword (LGPL-3.0) via Composer β the
standard dynamic-linking case the LGPL is written for.