Ratings | | Unique User Downloads | | Download Rankings |
66% | | Total: 871 | | All time: 4,034 This week: 60 |
|
Description | | Author |
This class can convert Microsoft Word DOCX document to HTML.
It can take file name of a Microsoft Word DOCX and extract its contents to obtain the XHTML document and image files.
The class can parse the contained XHTML files and process its tags to convert Microsoft Word XHTML tags into regular HTML tags.
Currently it can convert paragraph tags, formatting tags, image tags, link tags and table tags. Innovation Award
October 2020
Number 3 |
Many people use Microsoft Word application to create Word processing documents. However, Web applications use HTML to display documents in Web pages or send those documents as email messages to other people.
This class can convert Microsoft Word DOCX document with images to HTML to solve the problem of using Microsoft Word to create content to display Web pages or send it via email.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 3x |
|
Recommendations
Example
<?php
require_once('wordphp.php');
$rt = new WordPHP(false);
$text = $rt->readDocument('sample.docx');
echo $text;
?>
|
Details
This class read a DOCX file and output it to HTML format.
USAGE
debug mode
$rt = new WordPHP(true);
without debug
$rt = new WordPHP(false); or $rt = new WordPHP();
Set output encoding
$rt = new WordPHP(false, OUTPUT_ENCODING);
Read docx file and returns the html code
$text = $rt->readDocument(FILENAME);
NOTE:
To load images, please create a tmp folder where images can be extracted and saved from the document.
Don't forget to change the permissions in that folder so that the user that runs this class can write the images in it.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.