Thursday, 12 April 2012 06:08

Word Table for Silverlight

Written by support iceblue

The sample demonstrates how to Create Table in Word for Silverlight via Spire.Doc.


Tuesday, 10 April 2012 06:13

How to Convert RTF to HTML

Written by support iceblue

RTF is abbreviated from Rich Text Format which is a proprietary document file format with published specification developed in 1987 by Microsoft Corporation. Most word processors are able to read and write some versions of RTF. So it's still very popular. On the other hand, different web pages which most of them created by HTML documents make the internet a new World.

Spire.Doc, as a powerful .NET Word component, enables developers to convert files from RTF to HTML via C#/VB.NET. Download Spire.Doc or Spire.Office and install on system. Follow the simple instruction below to convert RTF to HTML via C#/VB.NET.

Step 1: Create a C#/VB.NET project in Visual Studio and add Spire.Doc.dll as reference. The default setting of Spire.Doc.dll is placed under "C:\Program Files\e-iceblue\Spire.Doc\Bin". Select assembly Spire.Doc.dll and click OK to add it to the project.

using System;
using Spire.Doc;
using Spire.Doc.Documents;

namespace RTF2HTML
    class Program
        static void Main(string[] args)
Imports Spire.Doc
Imports Spire.Doc.Documents

Namespace RTF2HTML
	Class Program
		Private Shared Sub Main(args As String())
		End Sub
	End Class
End Namespace

Step 2: Put the RTF file which we want to convert to HTML into the project folder. Use the code below to load it into the project.

            Document document = new Document();
Dim document As New Document()

Step 3: Spire.Doc presents an easy solution to convert RTF to HTML. Just use the one sentence simple code below to save the file as HTML format.

            //convert RTF to HTML
            document.SaveToFile("Sample.html", FileFormat.Html);
'convert RTF to HTML
document.SaveToFile("Sample.html", FileFormat.Html)

Step 4: Press F5 to start the project and an HTML file will generated in the project folder, bin → debug.

Effective Screenshot:


By using Spire.Doc, developers can use C#/VB.NET convert files among Word Doc, RTF, HTML, TEXT, XML, PDF, ePub, etc.

Thursday, 05 April 2012 06:24

Word Bookmark in Silverlight

Written by support iceblue

The sample demonstrates how to add bookmark into Word for Silverlight via Spire.Doc.