Advanced Search

Results 1 to 9 of 9

Thread: Convrt WordFile into HTML Code.

  1. #1
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Convrt WordFile into HTML Code.

    Hi,
    Do anyone have any idea about converting .doc or .docx file into HTML Code without using COM in PHP ?
    Thanks for any help.

  2. #2
    Join Date
    Aug 2009
    Location
    @charset "UTF-8"
    Posts
    122
    Thanks
    4
    Thanked 5 Times in 5 Posts

    Default

    File > Save As > HTML Document

  3. #3
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    @FrickenTrevor : Dude i am taking about converting Wordfile into HTML code using PHP.
    Anyways thanks for your efforts.

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,885
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    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 | Latest News RSS | Facebook | Twitter |
    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 |
    The only limit to creativity is imagination: JemCon.org

  5. The Following User Says Thank You to Beverleyh For This Useful Post:

    round (04-10-2013)

  6. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    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

  7. The Following User Says Thank You to djr33 For This Useful Post:

    round (04-10-2013)

  8. #6
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    @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).

  9. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,156
    Thanks
    262
    Thanked 690 Times in 678 Posts

    Default

    @djr33 : Yes i just need to have the text of the document only. Format doesn't matters in my case.
    Anyways thanks.
    Ok, that's reasonable then.

    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

  10. #8
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    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 ?

  11. #9
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    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.

Similar Threads

  1. html code
    By tareq2012 in forum HTML
    Replies: 1
    Last Post: 02-07-2012, 10:48 AM
  2. Replies: 3
    Last Post: 05-12-2011, 03:43 AM
  3. Replies: 15
    Last Post: 06-11-2009, 12:27 PM
  4. Replies: 2
    Last Post: 10-27-2008, 05:16 AM
  5. HTML code & SEO
    By KenTs in forum HTML
    Replies: 1
    Last Post: 12-07-2006, 01:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •