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;
}