Join RTF
-
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\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pard\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\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pard\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
-
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\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pard\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\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pard\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
I found a neat little workaround that you could try - 1. Create two instances of RichTextBox in the application. 2. Load the first RTF file into the first RichTextBox control. 3. Select and copy the content in the first RichTextBox control to Clipboard by calling the SelectAll and Copy methods of the RichTextBox class. 4. Paste the content (from Clipboard) to the second RichTextBox control by calling the RichTextBox.Paste method. That should give you merged rtf text...
-
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\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pard\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\sectd
\headery720\footery720\pgwsxn12240\pghsxn15840\marglsxn1138\margtsxn1138\margrsxn1138\margbsxn1138\pard\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
NRTFTree - A class library for RTF processing in C#[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN% R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
----------------------------------------------- 128 bit encrypted signature, crack if you can
-
I found a neat little workaround that you could try - 1. Create two instances of RichTextBox in the application. 2. Load the first RTF file into the first RichTextBox control. 3. Select and copy the content in the first RichTextBox control to Clipboard by calling the SelectAll and Copy methods of the RichTextBox class. 4. Paste the content (from Clipboard) to the second RichTextBox control by calling the RichTextBox.Paste method. That should give you merged rtf text...
Thanks abhinav...I was thinking this way, & most probably I will fllow this, unless I find a better solution... thanks for your thoughts
Sebastian