Western European ."\\deff0\\deflang9226 \n";//9226->Español Colombia $FamilyFont = array("\n", " {\\f1\\fnil\\fprq1\\fcharset0 TlwgMono;}\n", " {\\f2\\fswiss\\fprq1\\fcharset0 Arial;}\n", " {\\f3\\froman\\fprq1\\fcharset0 Times New Roman;}\n", " {\\f4\\fmodern\\fprq1\\fcharset0 Courier New;}\n", " {\\f5\\fscript\\fprq1\\fcharset0 Edwardian Script ITC;}\n"); //Familia de Fuentes $FontTable = "\n{\\fonttbl\n".$FamilyFont[0].$FamilyFont[1] .$FamilyFont[2].$FamilyFont[3].$FamilyFont[4].$FamilyFont[5]."}\n";//Tabla de Fuentes $Colors = array( "\\red0\\green0\\blue0;\n", //Negro "\\red0\\green0\\blue255;\n", //Azul "\\red0\\green255\\blue255;\n", //Cian "\\red0\\green255\\blue0;\n", //Verde "\\red255\\green0\\blue255;\n", //Magenta "\\red255\\green0\\blue0;\n", //Red "\\red255\\green255\\blue0;\n", //Amarillo "\\red255\\green255\\blue255;\n" //Blanco ); //Color de Fuentes $ColorTable = "\n{\\colortbl;\n".$Colors[0].$Colors[1].$Colors[2].$Colors[3]. $Colors[4].$Colors[5].$Colors[6].$Colors[7]."}\n";//Tabla de Colores $this->StartFile = $HeaderFile.$FontTable.$ColorTable; } public function __construct() { $this->ResetFile(); } public function ResetFile(){ $this->SetStartFile(); $this->RTFStringFile = $this->StartFile; } public function CloseFile(){ $this->RTFStringFile .= $this->CloseFile; } public function GetFile(){ return $this->RTFStringFile; } public function InsertLine(){ $this->RTFStringFile .= $this->NewLine; } public function InsertPage(){ $this->RTFStringFile .= $this->NewPage; } public function InsertParg(){ $this->RTFStringFile .= $this->NewParg; } public function AddText($Text){ $this->RTFStringFile .= $this->BasicFormat; $this->RTFStringFile .= $this->OtherFormat; $this->RTFStringFile .= $Text; $this->RTFStringFile .= "\n"; } public function AddElement($Element){ $this->RTFStringFile .= $Element; } public function SetBasicFormatTextFile($Align, $CFrnt, $CFond, $Fuente, $Talla) { $sCFrnt = "\\cf".$CFrnt; $sCFond = "\\highlight".$CFond; $sFuente = "\\f".$Fuente; $sTalla = "\\fs".(2*$Talla); global $aAlign; $this->BasicFormat = $this->aAlign[$Align].$sCFrnt.$sCFond.$sFuente.$sTalla."\n"; } public function SetOtherFormatTextFile($Negrt,$Italc,$Sbryd) { $sNegrt = ($Negrt==0)?"\\b0":"\\b";// Negrita $sItalc = ($Italc==0)?"\\i0":"\\i";// Itálica $sSbryd = ($Sbryd==0)?"\\ul0":"\\ul";// Subrayar $sFrmtSP = $sNegrt.$sItalc.$sSbryd."\n"; $this->OtherFormat = $sFrmtSP; } } ?>