Skip to content

Documentation and code examples for IronWord (ironsoftware.com/csharp/word/)

Notifications You must be signed in to change notification settings

iron-software/IronWord.Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NugetInstallsPassedwindowsmacOSlinuxdockerawsmicrosoftazurelivechat

IronWord - The C# Word Library

IronWord NuGet Trial Banner Image

IronWord, crafted by Iron Software, is a robust library empowering C# developers with tools to manipulate, create, and store Word documents in .NET applications and websites.

Key Functions of IronWord:

  • Manipulating, creating, and storing Word and DOCX files.
  • PageSetup: Customizing paper size, page orientation, margins, and background color.
  • TextRun: Managing text elements, styles, appending text, splitting, and integrating images.
  • TextStyle: Overseeing font type, size, color, boldness, italics, strikethrough, underlining, superscript, and subscript functionalities.
  • Paragraph: Incorporating text runs, images, shapes, aligning texts, and configuring bullets and numbering.
  • Table: Adjusting tables by adding rows, setting cell content, removing rows, merging cells, etc.
  • Image: Embedding images from files or streams, adjusting text wrapping, positioning, dimensions, and other characteristics.
  • Shape: Modifying text wrapping, positioning, dimensions, type of shapes, and rotation.

Explore more! Head to our homepage for detailed code samples and a comprehensive features list

Cross-Platform Compatibility of IronWord Includes:

  • .NET 8, .NET 7, .NET 6, and .NET 5, Core 2x & 3x, Standard 2, and Framework 4.6.2+
  • Systems like Windows, macOS, Linux, Docker, Azure, and AWS

IronWord Cross Platform Support Image

Visit our site for the API document reference and information on licenses.

How to Implement IronWord

To initiate, install the IronWord NuGet package using the following command in your package manager console:

PM> Install-Package IronWord

When installed, incorporate using IronWord; at the start of your C# scripts. Below is an illustrative example to assist with opening, modifying, and storing a document:

using IronWord;
using IronWord.Models;
using IronSoftware.Drawing;

// Load an existing Word document
var docxCurrent = new WordDocument("existing.docx");

// Or initiate a new Word document
var docxNew = new WordDocument();

// Creating a new paragraph with custom text
Paragraph newParagraph = new Paragraph();
var textContent = new Text()
{
    Text = "Welcome to IronWord!"
};
newParagraph.AddText(textContent);

docxCurrent.AddParagraph(newParagraph);

// Including an image within a paragraph
Image newImage = new Image("example.jpg");
newImage.Width = 200;  // Specify width in pixels
newImage.Height = 200; // Specify height in pixels

newParagraph = new Paragraph();

// Add the image
newParagraph.AddImage(newImage);

docxCurrent.AddParagraph(newParagraph);

// Overwrite the existing document
docxCurrent.Save("existing.docx");

// Alternatively, save as a new document
docxCurrent.SaveAs("output.docx");

Feature Overview

IronWord Features

Licensing & Support

Explore our extensive code examples, tutorials, licensing details, and documentation.

For any assistance, contact us via email at: [email protected]

Helpful Documentation Links

About

Documentation and code examples for IronWord (ironsoftware.com/csharp/word/)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages