Aspose.Words  for .NET

.NET API to Process Word Files

Create, edit, render and convert Word documents to multiple formats without using external software. You can also generate a report to visualize the data.

  Download Free Trial

Aspose.Words for .NET is an advanced document processing API to perform a wide range of management and manipulation tasks in a variety of file formats. API supports to create, modify, convert, render and print files without using Microsoft Word or other third-party software directly in cross-platform applications. You can see the full list of Aspose.Words features in our documentation.

Aspose.Words API supports all popular loading and saving formats. You can save or convert Word documents to fixed-layout formats such as PDF or XML, as well as convert your Word files to popular image or multimedia formats such as JPEG, SVG, GIF and others. Check out the full list of supported formats.

By integrating Words API, developers can perform tasks such as:

Advanced .NET Words API Features

You can try some of the popular Aspose.Words features on the online application pages:

You can try all Aspose.Words online applications.

Also check out the documentation for the most popular features in Aspose.Words:

Please note that the list is not complete and you can find more features and descriptions in the documentation.

Convert a Document in C#

API allows you to quickly, reliably and efficiently convert a file from one supported format to another with just two lines of code. It is so simple!

Convert Word to PDF using C#, e.g. DOCX to PDF – C#

// Load DOCX file to be converted
var wrdf = new Aspose.Words.Document(dir + "template.docx");

// Convert DOCX to PDF
wrdf.Save(dir + "output.pdf", Aspose.Words.SaveFormat.Pdf);

Convert Word to HTML using C#, e.g. DOCX to HTML – C#

// Load DOCX file to be converted
var wrdf = new Aspose.Words.Document(dir + "template.docx");

// Convert DOCX to HTML
wrdf.Save(dir + "output.html", Aspose.Words.SaveFormat.Html);

Convert PDF to JPG – C#

// Load PDF file to be converted
var wrdf = new Aspose.Words.Document(dir + "template.pdf");

// Convert PDF to JPG
wrdf.Save(dir + "output.jpeg", Aspose.Words.SaveFormat.Jpeg);

See more details on the Conversion page.

Render, Print or View Files

Aspose.Words for .NET has its own rendering engine specifically designed to render and print documents with highest fidelity. Using this feature, developers can render (draw) any page onto a .NET Graphics object while specifying the size and zoom level to create thumbnails for displaying images in a browser. Moreover, API is fully integrated with the .NET printing infrastructure and has the ability to completely customize the process so that developers can easily print or preview documents in their own applications.

Some of the rendering capabilities that API can perform:

Programming with Documents Using Document Object Model (DOM)

Aspose.Words for .NET allows you to create, build and modify documents, including document formatting, using an intuitive Document Object Model (DOM) with over 100 classes.

Here are just a few of the manipulation functions that the Words API can perform:

  • Work with whole documents: compare documents, clone documents, find and replace text, combine documents or document parts, split documents into parts and so on
  • Protect and encrypt documents, add a digital signature or watermark
  • Manage all elements including sections, headers, footers, paragraphs, lists, tables, text, fields and much more
  • Specify detailed formatting for any element, including shapes, text boxes, images, OLE objects, and controls
  • Work with complex and deeply nested expressions containing IF blocks, formulas and other fields

Reporting and Mail Merge

Aspose.Words for .NET provides an extended API syntax for mail merge fields to perform more complex operations during mail merge. You can perform a simple mail merge operation or mail merge with regions. Data for mail merge operation can come from various data tables, array of values supported by ADO .NET or custom data sources.

In addition, developers can use the LINQ Reporting Engine to generate documents from templates and data from a variety of sources, including databases, XML, JSON, OData, CLR custom type objects, external documents, and more right out of the box.

Execute simple mail merge – C#

// load the template containing merged fields

var wfle = new Aspose.Words.Document(dir + "template.doc");

// fill the fields with user data


    new string[] { "FullName", "Company", "Deparment", "City" },
    new object[] { "John Doe", "Aspose", "Sales", "London" });

// save the result

wfle.Save(dir + "merged.doc");

No Need for Microsoft Office Automation

You can work with documents programmatically without installing any other third-party application. This is possible because the library is built using managed code. Therefore, you do not need to install Microsoft Office or Microsoft Word on your computer to work with Word formats. It is a perfect alternative to Microsoft Office Automation in terms of supported features, security, stability, scalability, speed, and price.

What People Are Saying

Don't just take our word for it. See what users have to say about Aspose.Words APIs.

View Case Studies

Support and Learning Resources