PHP Classes

Introduction - PHP Parse DOCX to HTML with Images package blog

Recommend this page to a friend!
  All package blogs All package blogs   PHP Parse DOCX to HTML with Images PHP Parse DOCX to HTML with Images   Blog PHP Parse DOCX to HTML with Images package blog   RSS 1.0 feed RSS 2.0 feed   Blog Introduction  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Updated on: 2021-10-14

Posted on: 2021-10-14

Viewers: 7 (October 2021)

Package: PHP Parse DOCX to HTML with Images

Background to this class and info on screenshots and implementation




Loaded Article
Background
A while ago I was looking for a means of converting a Word DOCX file to display on a website using PHP. I found the class wordtohtml on this PHP classes website. I downloaded it, but found it very basic for my needs.

As the original author did not appear to still be involved, I forked the original Github repository and have now developed the class to recognise virtually all Word formatting, styles and themes except for tabs which are not really practical in html. I also developed this new class to also recognise multi-level lists with the correct alpha-numeric numbering and tables with merged cells. The resultant html when displayed in a web browser looks very similar to the original DOCX Word document.

Screenshots
There are some screenshots in my github repository showing both the word and htlm web browser screenshots for a sample file. For some reason I am unable to upload these to this PHP Classes page.

Implementation
As can be seen from the example file 'test.php', using the class in its default mode is very easy once you have downloaded the 'wordphp.php' file and loaded it to an appropriate place on your website.

Options
I have provided a few options on top of the default mode. See the Readme file for details of usage:-
1. Ability to change the output coding of the html
2. Allow external CSS file to format any images in the file
3. Allow tables to take up 100% of the screen width





You need to be a registered user or login to post a comment

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.




  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
  All package blogs All package blogs   PHP Parse DOCX to HTML with Images PHP Parse DOCX to HTML with Images   Blog PHP Parse DOCX to HTML with Images package blog   RSS 1.0 feed RSS 2.0 feed   Blog Introduction  
For more information send a message to info at phpclasses dot org.