Re: RTF to plain text

From: Date: Sat, 17 May 2003 08:44:10 +0000
Subject: Re: RTF to plain text
Groups: php.general 
Request: Send a blank email to php-general+get-148011@lists.php.net to get a copy of this message
Hello, you will need to parse the RTF file. You search for the RTF file speification. I have searched for that a while ago, and I know that RTF files have different versions. This may be relevant to you. If you want to just extract the plain text, it is relatively easy, you will just have to strip the formating code (kinda similar to HTML), but if you want to keep BOLD, ITALIC and UNDERLINE you will have to work more. I am not sure, but I think you might do this with (tons) REGEX. =) Hope you got a start here, Regards, *** Quote from original message *** Date: Fri, 16 May 2003 11:50:36 +0200 From: "Angelo Zanetti" <binc2@ctech.ac.za> Subject: RTF to plain text To: <php-general@lists.php.net> Hi ppl. I have a table and in it there are records which are saved in RTF format. Now on my website i have a php script that does a select on the table and returns the records, each record is entered into a row. I need to convert each record which is in RTF to normal text. This what a record will look likein RTF format: {¬rtf1¬ansi¬ansicpg1252¬deff0¬deflang1033{¬fonttbl{¬f0¬fnil¬fcharset0 MS Sans Serif;}} ¬viewkind4¬uc1¬pard¬f0¬fs17 hello ¬par } All i want is to display (in this case): hello (with relevant italics, bold and underline.) So basically what i need is to convert RTf to plain text, I have searched on the net and have had NO success so I would really appreciate some help. thanx in advance Angelo -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup

« previous php.general (#148011) next »