PHP Classes
elePHPant
Icontem

PHP docx to html with images converter: Need to convert docx to html with proper alignment and images

Recommend this page to a friend!
  All requests RSS feed  >  PHP docx to html with images converter  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

PHP docx to html with images converter

A request is featured when there is no good recommended package on the site when it is posted. Edit

by samy tech - 12 days ago (2020-02-05)

Need to convert docx to html with proper alignment and images

This request is clear and relevant.
This request is not clear or is not relevant.

+1

I have to import data from word file in database, so i searched for that , but didn't get any valid tutorial, that's why I have to try to convert a MicroSoft Word to HTML then get HTML data with the help of Curl into a database .

If you have any idea regarding this please share with me.

Ask clarification

1 Recommendation

PHP docx reader: Convert MS Word Docx files to text

This recommendation solves the problem.
This recommendation does not solve the problem.

0

by Manuel Lemos Reputation 18235 - 5 days ago (2020-02-12) Comment

The DOCX format in reality is a ZIP archive with an HTML document inside. That HTML document uses some custom styles defined by MicroSoft Word but you should be able to use that HTML document for rendering purposes.

So you can use the code of the recommended class above to extract the HTML that is inside.

If you want to extract specific sections you can use PHP DOM HTML classes or other custom HTML parser classes like this one below that I developed:

https://www.phpclasses.org/package/5614-PHP-Parse-and-filter-insecure-HTML-tags-and-CSS-styles.html


Recommend package
: 
: