PHP Classes

writable RTF

Recommend this page to a friend!

      RTF Generation Class  >  All threads  >  writable RTF  >  (Un) Subscribe thread alerts  
Subject:writable RTF
Summary:trying to generate a writable RTF-File
Messages:2
Author:Julien
Date:2008-11-05 14:32:25
Update:2011-08-17 12:51:42
 

 


  1. writable RTF   Reply   Report abuse  
Picture of Julien Julien - 2008-11-05 14:32:26
Someone an idea how i could manage to output a writable RTF-File?
When i open it in an program it says not writable.

my code is
-------------------------

require(PROJECT_BASE_DIR."/includes/class.rtf.php");
$RTF = new RTF();
$RTF->set_default_font("Arial", 12);
$RTF->set_font(Arial, 18);
$RTF->add_text("Übersetzungsauftrag");
$RTF->new_line();
$RTF->display();



the function display is
-------------------------


function display($filename = "document.rtf", $download = true)
{
$this->MyRTF .= "\n}\n}\n";
if ($download == true) // Download
{
header("Content-type: application/msword");
header("Content-Lenght: ". sizeof($this->MyRTF));
header("Content-Disposition: inline; filename=". $filename);
}
print $this->MyRTF;
}




  2. Re: writable RTF   Reply   Report abuse  
Picture of Rodion Rodion - 2011-08-17 12:51:42 - In reply to message 1 from Julien
asdasdasdasdasd asasd