https://github.com/t1gor/documentsparser
DOCx parser class in php
https://github.com/t1gor/documentsparser
Last synced: 12 months ago
JSON representation
DOCx parser class in php
- Host: GitHub
- URL: https://github.com/t1gor/documentsparser
- Owner: t1gor
- Created: 2013-03-26T18:38:25.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-19T14:09:52.000Z (about 13 years ago)
- Last Synced: 2025-04-04T17:04:59.372Z (over 1 year ago)
- Language: PHP
- Size: 1.81 MB
- Stars: 2
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
DOCx files parser
========
Parses the docx file and returns an html string. Any help or critics appreciated.
Supported elements:
--------------------
* paragraphs (w:p),
* images (pic:pic),
* links (w:hyperlink),
* tables (w:t),
* boorkmarks (w:bookmarkStart),
* lists.
TODO:
--------------------
* shapes support
* table cell styles
* add links filter
* images optimization (remove extra equal images)
* add i18n
Known issues:
--------------------
* memory consuming
* for big files, executing more than 30 sec (default timout time)
Usage example:
--------------------
```php
'images',
);
$defaultStyles = array();
$parser = new DocumentsParser($parserSettings, $defaultStyles);
// parse DOCx
$html = $parser->parseFile('test_document.docx');
// save content to file
file_put_contents('test_document.html', $html);
?>
```
Reminder links:
--------------------
* Comparing images - http://pastebin.com/wgeu2DqE
* OpenXML Standards - http://www.schemacentral.com/sc/ooxml/ss.html
* Awesome XML editor - http://www.oxygenxml.com/download_oxygenxml_developer.html