Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Join RTF

Join RTF

Scheduled Pinned Locked Moved C#
questiondatabasehelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sebastian T Xavier
    wrote on last edited by
    #1

    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

    A X 2 Replies Last reply
    0
    • S Sebastian T Xavier

      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

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      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...

      S 1 Reply Last reply
      0
      • S Sebastian T Xavier

        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

        X Offline
        X Offline
        Xmen Real
        wrote on last edited by
        #3

        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%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>

        ----------------------------------------------- 128 bit encrypted signature, crack if you can

        1 Reply Last reply
        0
        • A Abhinav S

          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...

          S Offline
          S Offline
          Sebastian T Xavier
          wrote on last edited by
          #4

          Thanks abhinav...I was thinking this way, & most probably I will fllow this, unless I find a better solution... thanks for your thoughts

          Sebastian

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups