This is the output of "Example 1", included in the library.
The Gios WORD .NET is the second thing that a good C# developer needs to deploy in his business projects... The first one?!? You probably know it is the Gios PDF .NET library!
So, that's why I decided to develop this library: after the need for generating PDFs, you will need the same for WORDs!
Gios WORD .NET supports:
- Tables with rows and columns span.
- Header and Footer
- Line indent - paragraph
- Custom Control Words (See the Rich Text Format (RTF) Specification for this implementation.)
- Output to a generic
Building a library for exporting documents in the Rich Text Format is quite easier than for PDFs. In fact, the Rich Text Format (RTF) Specification, version 1.8 shows how simple it is to generate a word document with all the well known features. I used the version 1.5 (which is fully compatible with WORD 97).
Using the code
The library is very simple to be used! The first thing you need to do is instantiating a new
and with the
WordDocument object you can start with the description of the document. It's like an automation. For example, if you want to set the font, you can write:
myWordDocument.SetFont(new Font("Comic Sans MS",
And now we set some alignment:
To write a text... You can imagine:
And, in the end, you output the document!
And this is the result:
Remember, you can also output the WORD Document to a generic stream. These are the lines for a web response:
To continue with the training, please download the library and follow the examples!
- August 8th, 2005 - First release.