المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Join RTF



C# Programming
06-26-2010, 12:40 PM
Hello,

I want to concatenate RTF texts from database and show them in a rich textbox as a single document without loosing formating.
I have one record like this
{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl
{\f0\fswiss\fcharset0\fprq2 Arial;}
{\f1\froman\fcharset2\fprq2 Symbol;}}
{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;}
{\stylesheet{\s0\itap0\nowidctlpar\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}}
{\*\generator TX_RTF32 14.0.520.503;}
\deftab1134\paperw12240\paperh15840\margl1138\margt1138\margr1138\margb1138\widowctrl\formshade\sect d
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\p ard\itap0\nowidctlpar\plain\f0\fs18\cf3 hello\par }
and another record like

{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl
{\f0\fswiss\fcharset0\fprq2 Arial;}
{\f1\froman\fcharset2\fprq2 Symbol;}}
{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;}
{\stylesheet{\s0\itap0\nowidctlpar\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}}
{\*\generator TX_RTF32 14.0.520.503;}
\deftab1134\paperw12240\paperh15840\margl1138\margt1138\margr1138\margb1138\widowctrl\formshade\sect d
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\p ard\itap0\nowidctlpar\plain\f0\fs18\cf3 world\par }
The output of first string is Hello & second is World
I want to display this in a RTF Editor as follows

Hello
World

how can I do that? Any help would be appreciated.....


Thanks
Sebastian