SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Apr 2006
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem converting html to doc

    Hi All ,
    I face a problem to convert html file to doc file in linux server.
    As I use table in html file,and when convert that file to doc using php, a fade
    color comes in the places of table borders. Even when I assign the
    border colour of table white, the problem remains same.

    Actually I use this method :
    $filename = "aa.doc";
    $somecontent = "<html><head><body> <table><tr><td> <? somecode ?> </td> <td> <? somecode ?> </td></tr></table></body></html>";
    ... like this

    $fp = fopen($filename,"w+");
    fwrite($fp,$somecontent);
    fclose($fp);
    Last edited by sovan; Apr 28, 2006 at 05:56.

  2. #2
    SitePoint Evangelist chiphunt1's Avatar
    Join Date
    Oct 2003
    Location
    louisville, ky
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perhaps you should check out this class and example for converting an HTML file to a doc file. It's a little more complicated than what you are trying to do, but thankfully someone has already written a class for it. There is an included example. You'll have to sign up for membership on phpclasses.org, but it is free and well worth it.

    http://www.phpclasses.org/browse/package/2763.html
    Calm down -- it's only ones and zeroes

  3. #3
    SitePoint Addict
    Join Date
    Apr 2006
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi All,
    I want to Convert html to doc in php(LINUX). But I face problem to convert it when I use table,
    and converts that in doc ,a fade colour of table borders comes to the doc;Even if I use
    <table border='0'> or <table bordercolor='white'> etc. The problem remains same.
    I have been given a link
    http://www.phpclasses.org/browse/package/2763.html
    Whence I got a class to convert html to doc. In spite of using that class that problem remains same; i.e., the fade colour of table border comes now too.
    Please Help me anyone ASAP so as to I can overcome that problem.


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
  •