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. Convert HTML to RTF

Convert HTML to RTF

Scheduled Pinned Locked Moved C#
htmltoolshelpquestion
13 Posts 7 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 Sebastian T Xavier

    Hello, I am in searchof a method that converts my HTML input into RTF. I don't want to have any 3rd party tools to do it. Can anyone help me to achieve this? Thanks in advance. Sebastian

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #2

    Sebastian T Xavier wrote:

    don't want to have any 3rd party tools to do it.

    OK, then you need to set aside a good amount of time to write the code to do it yourself. When you're done, you could probably sell it as a third party component.

    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

    1 Reply Last reply
    0
    • S Sebastian T Xavier

      Hello, I am in searchof a method that converts my HTML input into RTF. I don't want to have any 3rd party tools to do it. Can anyone help me to achieve this? Thanks in advance. Sebastian

      A Offline
      A Offline
      Alan Balkany
      wrote on last edited by
      #3

      Here's one way: 1. Display the HTML to be converted in a browser. 2. Press Ctrl-PrtScn to get a screen shot. 3. Start WordPad. 4. Press Ctrl-V to paste the screen shot. 5. Select File | Save As in WordPad. 6. Save as a .rtf file. And you have the HTML converted to rtf without any 3rd party tools.

      N 1 Reply Last reply
      0
      • A Alan Balkany

        Here's one way: 1. Display the HTML to be converted in a browser. 2. Press Ctrl-PrtScn to get a screen shot. 3. Start WordPad. 4. Press Ctrl-V to paste the screen shot. 5. Select File | Save As in WordPad. 6. Save as a .rtf file. And you have the HTML converted to rtf without any 3rd party tools.

        N Offline
        N Offline
        Nagy Vilmos
        wrote on last edited by
        #4

        Alan take a bow! You deserve MVP for that one answer!


        Panic, Chaos, Destruction. My work here is done.

        S 1 Reply Last reply
        0
        • N Nagy Vilmos

          Alan take a bow! You deserve MVP for that one answer!


          Panic, Chaos, Destruction. My work here is done.

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

          I never thought it as a hard task as that...... :(( I don't have months to spare for this....

          N L 2 Replies Last reply
          0
          • S Sebastian T Xavier

            Hello, I am in searchof a method that converts my HTML input into RTF. I don't want to have any 3rd party tools to do it. Can anyone help me to achieve this? Thanks in advance. Sebastian

            V Offline
            V Offline
            V 0
            wrote on last edited by
            #6

            try to put it in a Richtextbox and start from there. You'll probably have to manually escape the tags and replace them by rtf codes. (Readme's via google).

            V.
            Stop smoking so you can: Enjoy longer the money you save. Moviereview Archive

            1 Reply Last reply
            0
            • S Sebastian T Xavier

              I never thought it as a hard task as that...... :(( I don't have months to spare for this....

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #7

              If you don't mind a few shortcomings, why don't you just try using Word: let it open the HTML document and save as RTF. Warning: make sure not to have it save any HTML, Word's idea of HTML is a bit fundamentalist. :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


              D 1 Reply Last reply
              0
              • S Sebastian T Xavier

                I never thought it as a hard task as that...... :(( I don't have months to spare for this....

                N Offline
                N Offline
                Nagy Vilmos
                wrote on last edited by
                #8

                Any conversion between two formats can be problematic. In most cases the 'owners'of the formats generally provide the API's to convert. IF you are using MS Orifice, you can open HTML files and then save them to rtf; this can be done programatically.


                Panic, Chaos, Destruction. My work here is done.

                S 1 Reply Last reply
                0
                • N Nagy Vilmos

                  Any conversion between two formats can be problematic. In most cases the 'owners'of the formats generally provide the API's to convert. IF you are using MS Orifice, you can open HTML files and then save them to rtf; this can be done programatically.


                  Panic, Chaos, Destruction. My work here is done.

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

                  Thats a great input for me.... I will go ahead with this.... Thanks a lot Sebastian

                  1 Reply Last reply
                  0
                  • L Luc Pattyn

                    If you don't mind a few shortcomings, why don't you just try using Word: let it open the HTML document and save as RTF. Warning: make sure not to have it save any HTML, Word's idea of HTML is a bit fundamentalist. :)

                    Luc Pattyn [Forum Guidelines] [My Articles]


                    The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #10

                    Luc Pattyn wrote:

                    Word's idea of HTML is a bit fundamentalist.

                    Fundamentalist?? That's too "warm and fuzzy" a description for what Word considers HTML. No, I think "Jihad", "Shock and Awe", "GBU-43/B Massive Ordnance Air Blast bomb", ... those are a bit more accurate.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007, 2008

                    L 1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      Luc Pattyn wrote:

                      Word's idea of HTML is a bit fundamentalist.

                      Fundamentalist?? That's too "warm and fuzzy" a description for what Word considers HTML. No, I think "Jihad", "Shock and Awe", "GBU-43/B Massive Ordnance Air Blast bomb", ... those are a bit more accurate.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007, 2008

                      L Offline
                      L Offline
                      Luc Pattyn
                      wrote on last edited by
                      #11

                      I plead guilty. :-O My preference for understatement goes pale next to your highly accurate politico-military jargon. BTW: I'm beginning to worry about your long-term MS MVP status now. I wouldn't want to see another one go down and switch to Mac misery.

                      Luc Pattyn [Forum Guidelines] [My Articles]


                      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                      D 1 Reply Last reply
                      0
                      • L Luc Pattyn

                        I plead guilty. :-O My preference for understatement goes pale next to your highly accurate politico-military jargon. BTW: I'm beginning to worry about your long-term MS MVP status now. I wouldn't want to see another one go down and switch to Mac misery.

                        Luc Pattyn [Forum Guidelines] [My Articles]


                        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                        D Offline
                        D Offline
                        Dave Kreskowiak
                        wrote on last edited by
                        #12

                        I'm not an MS MVP anymore. I'm spending way too much time with my 15 month old son to keep up on MS's and CodeProject's stuff at the moment.

                        A guide to posting questions on CodeProject[^]
                        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                             2006, 2007, 2008

                        L 1 Reply Last reply
                        0
                        • D Dave Kreskowiak

                          I'm not an MS MVP anymore. I'm spending way too much time with my 15 month old son to keep up on MS's and CodeProject's stuff at the moment.

                          A guide to posting questions on CodeProject[^]
                          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                               2006, 2007, 2008

                          L Offline
                          L Offline
                          Luc Pattyn
                          wrote on last edited by
                          #13

                          Good choice. And yeah, your sig tricked me. :)

                          Luc Pattyn [Forum Guidelines] [My Articles]


                          The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                          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