0

How to find pictures in richtext, is there any method for doing that?

I need to generate html from richtext so i need to find picture and find on which position is.

This is code which i use to put picture in richtext

        Clipboard cl;            
        Bitmap myBitmap = new Bitmap("c:\\time.png");
        Clipboard.SetDataObject(myBitmap);
        Clipboard.SetImage(myBitmap);         
        rchBody.Paste();
john
  • 21
  • 5
  • 1
    Did you tried anything so far? Show your effort here.. Please read [FAQ] and [ask] – Soner Gönül Mar 13 '13 at 12:13
  • Can you outline this with some code? It's not clear what you mean by "rich text", there's at least two `RichTextBox` controls in .NET - the WinForms one and the XAML one - and a whole lot of other code that deals with "rich text". (And I believe both of them produce fairly opaque content that's not really suitable for processing, but I'm not so sure about that.) – millimoose Mar 13 '13 at 12:13

1 Answers1

2

While not exactly the same, have you looked at this other SO question? Convert Rtf to HTML .

The answer points you to this article: http://www.codeproject.com/Articles/27431/Writing-Your-Own-RTF-Converter

There you can get a lot of details on how to do it, including RTF with images.

Community
  • 1
  • 1
Anthony Queen
  • 2,348
  • 3
  • 18
  • 21