problem in reading .rtf document
Posted: Tue Oct 04, 2005 2:24 am
Hi everyone,
I am trying to read a .rtf document. I m using the following line of code just for testing purpose.
$fileName = "/usr/local/apache/htdocs/abc/testing.rtf";
$data = fopen($fileName, "r");
$data1 = fread($data, filesize($fileName));
echo $data1;
The above line of code gives output in the following maner in the browser window.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 This is a sample tesst page. Lets c it reads it or not.\par \par \b The bold text\par \par \b0 This is testing.\par }
so anyone here can help me to get the exact text of the .rtf document through php code ?
i'll be waiting for someones response...
Thnx .........
I am trying to read a .rtf document. I m using the following line of code just for testing purpose.
$fileName = "/usr/local/apache/htdocs/abc/testing.rtf";
$data = fopen($fileName, "r");
$data1 = fread($data, filesize($fileName));
echo $data1;
The above line of code gives output in the following maner in the browser window.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 This is a sample tesst page. Lets c it reads it or not.\par \par \b The bold text\par \par \b0 This is testing.\par }
so anyone here can help me to get the exact text of the .rtf document through php code ?
i'll be waiting for someones response...
Thnx .........