CodeIgniter Forums
how to html to .doc files? anyone? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to html to .doc files? anyone? (/showthread.php?tid=13160)



how to html to .doc files? anyone? - El Forum - 11-12-2008

[eluser]pixelazion[/eluser]
Anyone knows a better class out there? doesn't have to be a plugin or a library for CI, Please give me links... tnx tnx tnx a bunch ^_^


how to html to .doc files? anyone? - El Forum - 11-13-2008

[eluser]dcunited08[/eluser]
What exactly are you trying to do? What OS?


how to html to .doc files? anyone? - El Forum - 11-13-2008

[eluser]pixelazion[/eluser]
ok, let's say i have an html file, and i want it to be converted to a .doc file. wich can later be opened and edited by non-web people. ^_^ OS is not really an issue here.


how to html to .doc files? anyone? - El Forum - 11-14-2008

[eluser]palZ[/eluser]
I have found two libraries.
http://www.phpclasses.org/browse/package/2763.html
http://www.phpclasses.org/browse/package/2631.html

i have ported the first one to CI:

extract the html_to_doc.inc.php from zip and put in to system/plugins folder.

create new file to_doc_pi.php in system/plugins folder.

Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function doc_create($html, $filename)
{
    require_once(BASEPATH."plugins/html_to_doc.inc.php");
    $htmltodoc= new HTML_TO_DOC();
    $htmltodoc->createDocFromURL($html, $filename);
}
?>


Finally create test controller doc.php:

Code:
<?php
class Doc extends Controller{
    function Doc(){
        parent::Controller();
    }

    function index(){
        $this->load->plugin('to_doc');
        doc_create('http://google.com', 'google');
    }
}
?>



how to html to .doc files? anyone? - El Forum - 11-14-2008

[eluser]pixelazion[/eluser]
wow! nice man... tnx a bunch