PRODUCTS   DOWNLOAD PURCHASE SUPPORT BLOG  COMPANY  
 
Key Features
HTML to RTF
>>HTML to Text
Merge RTF
Download trial
Purchase
Online-demo
Documentation
What's New
Tutorials & Videos
How to convert multiple HTML files to a single RTF using C# .Net platform.

"How to extract Text from HTML in C# and .Net?"

How to extract Text from HTML in C# and .Net?

Introduction

    Rest assured, if you are looking a .Net solution how to extract a Text from HTML document, you are in the right place. To illustrate, let's see the simplest C# code:
            SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();            
            string htmlString = @"Hello World!";

            h.OutputFormat = HtmlToRtf.eOutputFormat.TextUnicode;
            string textString = h.ConvertString(htmlString);
          
To get the ability of HTML conversion in you .Net application:
  • Download the latest «HTML to RTF .Net» SDK.
  • Follow to the "Solution Explorer" tab and add a reference to the "SautinSoft.HtmlToRtf.dll".
Not too shabby! Not too shabby! You will likely be surprised at the amount of built in functionality and ability to convert also to RTF format:
How looks HtmlToRtf .Net class

Download HTML to RTF .Net Online Demo


Have a Question?

You have a question, need a support or a code example: ask our support team at support@sautinsoft.com. We will help you quickly and with pleasure.

At the final point of this page we've prepared three various examples to extract Text from HTML.

Three examples to extract Text from HTML in C# and VB.Net

1. Simple extraction of Text from HTML file in C#:

            SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();

            string htmlFile = @"d:\Resurrection.html";
            string textFile = Path.ChangeExtension(htmlFile, ".txt");

            h.OutputFormat = HtmlToRtf.eOutputFormat.TextUnicode;
            h.ConvertFile(htmlFile, textFile);
2. Convert HTML to Text in memory using C#:
            SautinSoft.HtmlToRtf h = new SautinSoft.HtmlToRtf();

            string htmlFile = @"d:\Resurrection.html";
            string htmlString = File.ReadAllText(htmlFile);

            // Start the conversion.
            h.OutputFormat = HtmlToRtf.eOutputFormat.TextAnsi;
            string textString = h.ConvertString(htmlString);
3. Extract Text from HTML in memory using VB.Net:
			Dim h As New SautinSoft.HtmlToRtf()

			Dim htmlFile As String = "d:\Resurrection.html"
			Dim htmlString As String = File.ReadAllText(htmlFile)

			' Start the conversion.
			h.OutputFormat = HtmlToRtf.eOutputFormat.TextUnicode
			Dim textString As String = h.ConvertString(htmlString)

If anyone needs a code sample in C#, VB.Net, ASP.Net etc "How to convert HTML to Text", email us at support@sautinsoft.com or ask at Online Chat (right-bottom corner of this page). We'll help you certainly!


Requrements and Technical Information

     Requires only .Net 2.0 or above. Our product is compatible with all .Net languages and supports all Operating Systems where .Net Framework can be used. Note that «HTML to RTF .Net» is entirely written in managed C#, which makes it absolutely standalone and an independent library.



Reasonable prices

     The library offers developers high quality conversion at reasonably prices. The main point of interest is that «HTML to RTF .Net» is less expensive than all of its more or less popular counterparts. For example, a single license cost $239 with no additional fees or royalties!


Download

To see this functionality firsthand, download the freshest «HTML to RTF .Net» with code examples, 4.82 Mb.

 
 
Products Downloads Support Company
Buy now
Follow us on Google Plus SautinSoft on Facebook SautinSoft on Twitter SautinSoft on Youtube Our Blog
Copyright © 2002 - 2017 SautinSoft (started from sautin.com). All rights reserved.