Aspose.Words for .NET is an advanced Word document processing API to perform a wide range of document management and manipulation tasks. API supports to generate, modify, convert, render and print documents without utilizing Microsoft Word directly within cross-platform applications. Moreover, API supports all the popular Word Processing file formats as well as allows exporting or converting Word documents to fixed-layout file formats and most commonly used image/multimedia formats.
By integrating API, some of the basic tasks developers can perform such as designing of fully-featured Microsoft Word reports having standard mail merge fields, reliable conversion between several popular formats, high fidelity rendering of pages, formatting of all document elements and more.
Popular Document Formats Conversion
Aspose.Words for .NET allows quick, reliable & high-quality conversion from any supported file format to another with just two lines of code. It is that simple!
// load the file to be converted
var document = new Aspose.Words.Document(dir + "template.doc");
// save in different formats
document.Save(dir + "output.docx", Aspose.Words.SaveFormat.Docx);
document.Save(dir + "output.pdf", Aspose.Words.SaveFormat.Pdf);
document.Save(dir + "output.html", Aspose.Words.SaveFormat.Html);
Render, Print or View Word Documents
Aspose.Words for .NET has its own rendering engine specially designed for rendering & printing with highest of fidelity to the Microsoft Word. Using this feature, developers can render (draw) any document page onto a .NET Graphics object while setting the size and zoom level to create thumbnails for displaying images in the browser. Moreover, API is fully integrated with the .NET printing infrastructure and have the ability to completely customize the process, so that developers can easily print or preview documents within their own applications
Few of the rendering capabilities that API can perform
- Render pages or full documents to PDF, XPS or SWF.
- Document pages to images including but limited to PNG, EMF, JPEG, GIF.
- Individual document shapes into raster or vector images.
- Render pages or shapes to a .NET Graphics object with transforms.
Programming with Document Object Model
Aspose.Words for .NET allows you to create, build and modify documents - including document formatting with an intuitive document object model that consists of over 100 classes. Some of the manipulations features that API can perform
- Manipulate all document elements including but not limited to sections, headers, footers, paragraphs, lists, tables, text, fields and much more.
- Specify detailed formatting for any document element including shapes, text boxes, images, OLE objects, and controls.
- API can easily deal complex and deeply nested expressions containing IF blocks, formulas and other fields.
- Provides utility features such as joining or splitting documents, copying fragments between documents, protecting and unprotecting documents and a lot more.
Reporting & Mail Merge
Aspose.Words for .NET provides LINQ Reporting Engine to generate documents based upon template documents and data from different sources including databases, XML, JSON, OData, objects of custom CLR types, external documents, and more out of the box. API's Reporting Engine supports
- Repeatable and conditional document blocks.
- Dynamically generated charts and images.
- Insertion of outer documents and HTML blocks into a document.
- Various types of data sources for the creation of a single document.
- Built-in support of data relations.
- WYSIWYG generated document as of the corresponding template.
Additionally, developers can use API's extended syntax for mail merge fields to perform more complex operations during mail merge operations such as inserting images or repeatable regions. The data to drive your reports or mail merges can come from an ADO.NET data table, business objects or from a completely custom data source.
// load the template containing merged fields
var document = new Aspose.Words.Document(dir + "template.doc");
// fill the fields with user data
document.MailMerge.Execute(
new string[] { "FullName", "Company", "Deparment", "City" },
new object[] { "John Doe", "Aspose", "Sales", "London" });
// save the result
document.Save(dir + "merged.doc");
Microsoft Office Automation - Not Needed
Aspose.Words for .NET is built using managed code that does not need Microsoft Office or Microsoft Word to be installed on the machine to work with Word document formats. It is a perfect Microsoft Office automation alternative in terms of supported features, security, stability, scalability, speed and price.