[VB .NET] RTF to HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cash
    New Member
    • Apr 2007
    • 8

    [VB .NET] RTF to HTML

    HI!

    I need to pass a document rtf (ritchtextbox) to HTML... I found one or two functions but only works with (bold, italic , underline and size of letters).

    I need keep format of text (center, left, ...) images, bullets, etc




    PS: sorry ! My english is poor :(
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by cash
    I need to pass a document rtf (ritchtextbox) to HTML... I found one or two functions but only works with (bold, italic , underline and size of letters).

    I need keep format of text (center, left, ...) images, bullets, etc
    Perhaps you could load it into Word and save as HTML?

    Comment

    • cash
      New Member
      • Apr 2007
      • 8

      #3
      i have one aplication made in asp. This aplication keeps a string (html of the document) in database.

      Now i need do aplication in vb.net to work with that database too.

      In vb.net how do i load RTF in word and then pass to html ???




      thanks..


      PS : sorry my english .

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        One quick and simple method (though probably far from being the best) would be to save the string to a temporary file with the appropriate extension (.RTF if it's RTF format). Then open that file in Word, and use Save As... to save it as an HTML document.

        Comment

        • cash
          New Member
          • Apr 2007
          • 8

          #5
          that is a solution but i need something like this...

          link

          this is in c#.

          I´m trying to convert to vb.net and update if necessary ...



          ... if you have another solution, be free to post :-)


          thanks for your help

          Comment

          • Laxmi Peterson
            New Member
            • Nov 2011
            • 2

            #6
            Try this RTF to HTML .Net library and this code in VB.Net:

            Code:
            	    Dim r As New SautinSoft.RtfToHtml()
                    Dim rtfFile As String = "E:\test.rtf"
                    Dim htmlFile As String = "E:\test.html"
            
                    Dim i As Integer = r.ConvertFile(rtfFile, htmlFile)
                    If i = 0 Then
                        System.Console.WriteLine("Converted successfully!")
                        System.Diagnostics.Process.Start(htmlFile)
                    Else
                        System.Console.WriteLine("Converting Error!")
                    End If

            Comment

            Working...