PHP Based Docx Parser
Switch branches/tags
Clone or download
PhilGale92 tidied gitignore...
now deals with external links.
Resolves #48
Latest commit f072da4 May 21, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Docx tidied gitignore... May 21, 2017
tmp tidied gitignore... May 21, 2017
.gitignore tidied gitignore... May 21, 2017
LICENSE V3 rewrite Jan 7, 2014
README.md removed redundant readme stuff Dec 7, 2016
functions.php V3 rewrite Jan 7, 2014
html.tpl.php V3 rewrite Jan 7, 2014
index.php Removed krumo Jul 23, 2016

README.md

Docx Parser

This PHP based parser takes any docx file, and creates a PHP array containing its structure, content & style information. Simply import any style data (as demonstrated within index.php) using the word style name & any desired attributes and run the parser.

====

Supports:

  • Word styles
  • Paragraphs
  • Text indentation / tabbing
  • Nested lists (& inline lists)
  • Tables (Vertical cell merging + colspans)
  • Images (& finding the required image size)
  • Hyperlinks (With mailto: support)
  • Bold / Underlined / Italic text
  • Textboxes (Parser support added, but not rendered)
  • Table of content functionality (You likely need to extend the docx class & modify the ->render() class)

====

Caveats:

  • Images are displayed at the same dimensions as in word, however the included rendering class does not contain functionality for resizing the raw image files as required (due to it being out of scope for this project)
  • The parser may take some time to run on larger documents
  • Modifying text in word to look the same as a header style is not the same as setting its stylename to 'header'

====

Requirements:

  • PHP 5.3 or greater
  • /tmp writable by PHP