-
Word Doc to HTML Conversion using Php?
How to do it? i already google but still cant find. what i want is the doc file will be uploaded and can be view in a webpage in html format.
Last edited by dwaqaddi; 05-07-2012 at 02:16 AM.
-
Member
-
You can do this manually with DOCX if you know the OOXML specification. The DOCX file is just a ZIP file that can be extracted using PHP's ZipArchive class. Use PHP's directory function to open document_name\word\document.xml. Use PHP's XML class to locate <w:t> node. Extract the node value which give you the text that was written using Office Word 2007 or later. Use your CSS skills to display it like you are viewing it in Word. I'm not sure if there's any script out there that already does this but this is doable without relying on Windows's COM. As for the images, it's up to you to analyze the XML and where to extract the coordinates that you can convert to CSS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules