Results 1 to 5 of 5

Thread: downloading webpage as word document

  1. #1
    Join Date
    Mar 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default downloading webpage as word document

    I have a webpage which i wish to allow users to download as a word document (the web page layout/styles are stored in a css file)

    is there any quick way of converting the html into a word doc including the css file (ie set the mime type etc???)

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No. HTML is not a desktop publishing format. There are quite a few differences which just don't work the same way between a browser and a word processor.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, yes. There is a way.
    It would be, if not more, using PHP to set the right mime type, output as a .doc AFTER converting the formatting. This basically involves writing something just as complex as a browser that will read html and interpret it then replace the formatting with that of word.
    So... no, it would be too hard. It's theoretically possible.
    Additionally, even if you were to, there are just things that are different about the languages. For a simple example, consider javascript that might crucial to the page. that won't work in word. Other complex formatting things won't either, if they aren't available in both formats. Etc.

    Note that you can open a .html format file in word and edit there. I don't recommend this, but if you are trying to import something to word, then that would help. (Outputting from word to html creates incompatible messy code. Bad idea. Don't do that.)
    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

  4. #4
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    hmm... I wonder how Writely can do it.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

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
  •