Independentsoft
Home
Products
Purchase
Support
Downloads
Company
Contact
ODF .NET
>
Tutorial
> Display text
The example shows you how to open a text document and display document's content as plain text.
C# example
using System; using Independentsoft.Odf; namespace Sample { class Program { static void Main(string[] args) { TextDocument doc = new TextDocument("c:\\test.odt"); string text = doc.ToText(); Console.WriteLine(text); Console.Read(); } } }
VB example
Imports System Imports Independentsoft.Odf Module Module1 Sub Main(ByVal args() As String) Dim doc As New TextDocument("c:\test.odt") Dim text As String = doc.ToText() Console.WriteLine(text) Console.Read() End Sub End Module