Hi,
Do anyone have any idea about converting .doc or .docx file into HTML Code without using COM in PHP ?
Thanks for any help.
Hi,
Do anyone have any idea about converting .doc or .docx file into HTML Code without using COM in PHP ?
Thanks for any help.
File > Save As > HTML Document
@FrickenTrevor : Dude i am taking about converting Wordfile into HTML code using PHP.
Anyways thanks for your efforts.
Are you wanting to just convert/clean the markup generated by MS Word? (to strip out all the extra tags/bumf)
Maybe a function like this?: http://forums.squizsuite.net/index.php?showtopic=11304
Or maybe something here?: http://stackoverflow.com/questions/4...html-using-php
Focus on Function Web Design
Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps
round (04-10-2013)
It's going to be a mess. The styling is just different, and whatever happens it won't work out perfectly or be optimal HTML code.
Your best option is to re-create everything in HTML based loosely on the Word document. That's more work, but, well, the formats are just incompatible.
You CAN get a readable webpage from a Word document, but it won't be a good webpage. It depends on your goals.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
round (04-10-2013)
@djr33 : Yes i just need to have the text of the document only. Format doesn't matters in my case.
Anyways thanks.
@Beverleyh : Thanks for your reply, but it doesn't work with my Wamp.
I am getting null value of $index.
Do i need to start any service ?
can you please help me ?
Sorry i am talking about second link (stackoverflow).
Ok, that's reasonable then.@djr33 : Yes i just need to have the text of the document only. Format doesn't matters in my case.
Anyways thanks.
Do you need .doc and .docx? The latter may be possible using just PHP with an XML parser. The former will need something more specific, specially designed for reading the .doc format.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
I do need for both.
Actually Customers on my site will upload their doc/docx file. I have to show these files in my CKEditor in backend when they logedin into their account, So that they can chage if they need something to change.
I can not change the concept of uploading doc.docx file, It is on of the requirement of this project. I have to find the way to solve this problem.
By the way i tried with .doc file when it gives null $index. Do you have any solution for this ?
I got one solution to get contents from doc/docs file is file_get_contents(). or you can also open file using fopen() then Read file using fread().
Both the methods will gove only texts(Contents), You can not able to get exact structure.!!
[Mod's note: we'll delete spam as we get a chance; the "report" feature will let us know that it's here, but please don't quote it or reply to it, so that when we delete it there's no additional copy or other material that doesn't fit in the thread. In this case I've removed your reply/quote in addition to the spam message itself.]
Last edited by djr33; 04-10-2013 at 01:09 PM.
Bookmarks