Aspose.Words
24.12.0
dotnet add package Aspose.Words --version 24.12.0
NuGet\Install-Package Aspose.Words -Version 24.12.0
<PackageReference Include="Aspose.Words" Version="24.12.0" />
paket add Aspose.Words --version 24.12.0
#r "nuget: Aspose.Words, 24.12.0"
// Install Aspose.Words as a Cake Addin #addin nuget:?package=Aspose.Words&version=24.12.0 // Install Aspose.Words as a Cake Tool #tool nuget:?package=Aspose.Words&version=24.12.0
Word Document Processing .NET API
Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License
Aspose.Words for .NET is a class library that can be used by C#, F#, VB.NET developers for a variety of document-processing tasks, including document generation, modification, converting, and rendering. Our library is self-sufficient and doesn't depend on any third-party software, such as Microsoft Word, OpenOffice, and similar office suites.
This package can be used to develop applications for a vast range of operating systems (Windows, Linux, macOS, iOS, Android) and platforms such as Windows Azure, Xamarin.Android, Xamarin.iOS, Xamarin.Mac. You can build both 32-bit and 64-bit software, including ASP.NET, WCF, and WinForms. Also, you can use our library via COM Interop from ASP, PHP, Perl, and Python programming languages.
Please note: our library implies the use of .NET programming languages, compatible with CLI infrastructure. If you require a corresponding native library for C++, you can download it from here. The Python version you can download from here.
Functionality
- Provides comprehensive document import and export with 35+ supported file formats. This allows developers to convert documents from one file format to another. For example, you can convert PDF to Word and Word to PDF documents with professional quality.
- Provides full access to all Word and OpenOffice document elements, including formatting properties and styling.
- Provides high-fidelity rendering of Word documents to PDF, JPG, PNG and other imaging formats.
- Provides the ability to print OpenOffice and Word documents programmatically.
- Supports powerful Report Generation with Mail Merge functionality, which allows creating documents dynamically using templates and data sources.
- Contains a flexible LINQ Reporting Engine, designed to fetch data from databases, XML, JSON, OData, external documents.
- Provides a rich set of utility functions, you can use to split a document into parts, join documents together, compare documents, and much more.
To become familiar with the most popular Aspose.Words functionality, please have a look at our free online applications.
Supported Formats
Format | Description | Load | Save |
---|---|---|---|
Microsoft Word Formats | Formats related to Microsoft Word document and template files | ||
DOC | Microsoft Word 97–2003 document format | ✔️ | ✔️ |
DOT | Microsoft Word 97–2003 template format | ✔️ | ✔️ |
DOCX | Microsoft Word Open XML document format | ✔️ | ✔️ |
DOTX | Microsoft Word Open XML template format | ✔️ | ✔️ |
DOTM | Microsoft Word Open XML template format with macros | ✔️ | ✔️ |
FlatOpc | Open Packaging Convention flat file format for Word documents | ✔️ | ✔️ |
FlatOpcMacroEnabled | Open Packaging Convention flat file format for macro-enabled documents | ✔️ | ✔️ |
FlatOpcTemplate | Open Packaging Convention flat file format for templates | ✔️ | ✔️ |
FlatOpcTemplateMacroEnabled | Open Packaging Convention flat file format for macro-enabled templates | ✔️ | ✔️ |
RTF | Rich Text Format, used for cross-platform document exchange | ✔️ | ✔️ |
WML | XML-based format for Word documents introduced in Word 2003 | ✔️ | ✔️ |
DocPreWord60 | Microsoft Word formats older than Word 6.0 | ✔️ | |
OpenDocument Formats | OpenDocument file formats used by OpenOffice and LibreOffice | ||
ODT | OpenDocument Text format, used by OpenOffice and LibreOffice | ✔️ | ✔️ |
OTT | OpenDocument Text template format | ✔️ | ✔️ |
Web Formats | Formats for web-based document presentation. | ||
HTML | HyperText Markup Language for web pages | ✔️ | ✔️ |
MHTML | MIME encapsulation of aggregate HTML documents (web archive format) | ✔️ | ✔️ |
Text Formats | Plain text format and formats for lightweight markup language text files | ||
MD | Markdown format for lightweight text-to-HTML conversion | ✔️ | ✔️ |
TXT | Plain text format | ✔️ | ✔️ |
Fixed-Layout Formats | Formats for fixed-layout document representation | ||
Portable Document Format, widely used for fixed-layout documents | ✔️ | ✔️ | |
eBook Formats | Formats used for eBooks | ||
AZW3 | Amazon Kindle eBook format | ✔️ | ✔️ |
EPUB | Open standard eBook format | ✔️ | ✔️ |
MOBI | Mobipocket eBook format | ✔️ | ✔️ |
CHM | Compiled HTML Help format, used for software documentation | ✔️ | ✔️ |
XPS Formats | XML-based formats for document printing and archiving | ||
XPS | XML Paper Specification format, used for document printing and archivin | ✔️ | |
OpenXps | Open standard for XPS documents | ✔️ | |
PostScript Formats | PostScript-based formats for printing workflows | ||
PS | PostScript format, commonly used for professional printing workflows | ✔️ | |
EPS | Encapsulated PostScript, a variant of PostScript for images and graphics | ✔️ | |
Printer Formats | Formats used for direct printing instructions | ||
PCL | Printer Command Language, used by HP printers | ✔️ | |
XAML and HTML Fixed Formats | Fixed and flow-layout formats for digital viewing | ||
XamlFixed | XAML-based fixed layout format for displaying documents | ✔️ | |
HtmlFixed | HTML-based fixed layout format for displaying documents in web browser | ✔️ | |
XamlFlow | XAML-based flow layout format for displaying reflowable content | ✔️ | |
XamlFlowPack | Packaged XAML flow layout format | ✔️ | |
Image Formats | Formats for converting documents into image representations | ||
SVG | Scalable Vector Graphics format for vector-based images | ✔️ | |
TIFF | Tagged Image File Format for high-quality raster images | ✔️ | |
PNG | Portable Network Graphics format for lossless raster images | ✔️ | |
BMP | Bitmap format for uncompressed raster images | ✔️ | |
JPEG | Joint Photographic Experts Group format for compressed raster images | ✔️ | |
GIF | Graphics Interchange Format, often used for animations and small images | ✔️ | |
WEBP | Modern image format providing both lossy and lossless compressio | ✔️ | |
Vector Graphics Formats | Formats for vector graphics | ||
EMF | Enhanced Metafile format for vector graphics on Windows platform | ✔️ | |
Spreadsheet Formats | Formats for handling spreadsheet files | ||
XLSX | Microsoft Excel Open XML spreadsheet format | ✔️ | |
XML Formats | Custom XML-based formats | ||
XML | Custom XML-based document format | ✔️ |
Getting Started
So, you probably want to jump up and start coding your document processing application on C#, F# or Visual Basic right away? Let us show you how to do it in a few easy steps.
Run Install-Package Aspose.Words
from the Package Manager Console in Visual Studio to fetch the NuGet package.
If you want to upgrade to the latest package version, please run Update-Package Aspose.Words
.
You can run the following code snippets in C# to see how our library works. Also feel free to check out the GitHub Repository for other common use cases.
Create a DOCX using C#
Aspose.Words for .NET allows you to create a blank Word document and add content to the file.
// Create a Word document.
Document doc = new Document();
// Use a DocumentBuilder instance to add content to the file.
DocumentBuilder builder = new DocumentBuilder(doc);
// Write a new paragraph to the document.
builder.Writeln("This is an example of a Word document created in C#");
// Save it as a DOCX file. The output format is automatically determined by the filename extension.
doc.Save("OutputWordDocument.docx");
Create a PDF in C#
Aspose.Words for .NET allows you to create a new PDF file and fill it with data.
// Create a PDF document.
Document pdf = new Document();
// Use a DocumentBuilder instance to add content to the file.
DocumentBuilder builder = new DocumentBuilder(pdf);
// Write a new paragraph to the document.
builder.Writeln("This is an example of a PDF document created using C#");
// Save it as a PDF file.
pdf.Save("OutputDocument.pdf");
Convert a Word document to HTML with C#
You can convert Microsoft Word to PDF, XPS, Markdown, HTML, JPEG, TIFF, and other file formats. The following snippet demonstrates the conversion from DOCX to HTML:
// Load a Word file from the local drive.
Document doc = new Document("InputWordDocument.docx");
// Save it to HTML format.
doc.Save("OutputHtmlDocument.html");
Import a PDF and save as a DOCX via C#
In addition, you can import a PDF file into your .NET application and export it as a DOCX format file without the need to install Microsoft Word:
// Load a PDF file from the local drive.
Document pdf = new Document("InputDocument.pdf");
// Save it to DOCX format.
pdf.Save("OutputWordDocument.docx");
Generate a summary of the document(s) using OpenAI or Google models.
Document firstDoc = new Document("DocumentA.docx");
Document secondDoc = new Document("DocumentB.docx");
// Use OpenAI or Google generative language models.
IAiModelText model = (IAiModelText)AiModel.Create(AiModelType.Gpt4OMini).WithApiKey(apiKey);
Document summary = model.Summarize(firstDoc, new SummarizeOptions() { SummaryLength = SummaryLength.Short });
summary.Save("SummaryA.docx");
Document multiSummary = model.Summarize(new Document[] { firstDoc, secondDoc }, new SummarizeOptions() { SummaryLength = SummaryLength.Long });
multiSummary.Save("SummaryA+B.docx");
Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net40-client is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.0 Client
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETStandard 2.0
- Autofac (>= 6.4.0)
- Microsoft.Win32.Registry (>= 5.0.0)
- Newtonsoft.Json (>= 13.0.1)
- SkiaSharp (>= 2.88.8)
- System.Reflection.Emit (>= 4.7.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
-
net6.0
- Autofac (>= 6.4.0)
- Microsoft.Win32.Registry (>= 5.0.0)
- Newtonsoft.Json (>= 13.0.1)
- SkiaSharp (>= 2.88.8)
- System.Reflection.Emit (>= 4.7.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
-
net8.0
- Autofac (>= 6.4.0)
- Microsoft.Win32.Registry (>= 5.0.0)
- Newtonsoft.Json (>= 13.0.1)
- SkiaSharp (>= 2.88.8)
- System.Reflection.Emit (>= 4.7.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
NuGet packages (60)
Showing the top 5 NuGet packages that depend on Aspose.Words:
Package | Downloads |
---|---|
Ewl
The Enterprise Web Library (EWL), together with its tailored infrastructure platform, is a highly opinionated foundation for web-based enterprise software. |
|
GroupDocs.Classification
GroupDocs.Classification for .NET is an easy to use library that allows performing sentiment analysis (classification), document classification, and raw text categorization. Features: * Classifies both raw text and documents with IAB-2, Documents, Sentiment, or Sentiment3 taxonomies. * Sentiment Analysis (Classification) supports Positive/Negative or Positive/Neutral/Negative taxonomies for English, Chinese, German, or Spanish languages. * Returns the probability of each class. Supported document formats: * Microsoft Word documents - DOC, DOT, DOCX, DOCM, DOTX, DOTM, TXT, RTF; * Open Document formats - ODP, ODS, ODT, OTT; * Portable Document Formats - PDF; For more details on the GroupDocs.Classification for .NET API, please visit GroupDocs website at: https://www.groupdocs.com/products/classification/net |
|
Aspose.Words.Shaping.HarfBuzz
Aspose.Words.Shaping.HarfBuzz is a .NET wrapper around HarfBuzz shaping engine for use in Aspose.Words. Free support for Aspose.Words for .NET is provided on our support forum: https://forum.aspose.com/ and on StackOverflow: https://stackoverflow.com/questions/tagged/aspose.words |
|
Aspose.Total
Aspose.Total for .NET is the most complete package of all .NET file format APIs offered by Aspose. It empowers developers to create, edit, render, print and convert between a wide range of popular document formats within any .NET, C#, ASP.NET and VB.NET applications. |
|
SuperOffice.NetServer.Core
SuperOffice NetServer Core is SuperOffice's data access technology for new applications. This is for onsite installations with the same version. This also works with SuperOffice Online. |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Aspose.Words:
Repository | Stars |
---|---|
aspose-words/Aspose.Words-for-.NET
Aspose.Words for .NET examples, plugins and showcases
|
|
xhnbzdl/feishu-doc-export
飞书文档导出服务
|
|
aspose-pdf/Aspose.PDF-for-.NET
Aspose.PDF for .NET examples, plugins and showcase projects
|
Version | Downloads | Last updated |
---|---|---|
24.12.0 | 25,984 | 12/6/2024 |
24.11.1 | 60,763 | 11/14/2024 |
24.11.0 | 20,398 | 11/11/2024 |
24.10.0 | 123,530 | 10/8/2024 |
24.9.0 | 110,791 | 9/9/2024 |
24.8.0 | 188,694 | 8/7/2024 |
24.7.0 | 159,446 | 7/8/2024 |
24.6.0 | 170,609 | 6/6/2024 |
24.5.0 | 185,525 | 5/3/2024 |
24.4.0 | 181,011 | 4/3/2024 |
24.3.0 | 156,561 | 3/5/2024 |
24.2.0 | 249,962 | 2/5/2024 |
24.1.0 | 268,364 | 12/29/2023 |
23.12.0 | 271,647 | 12/4/2023 |
23.11.0 | 241,053 | 11/6/2023 |
23.10.0 | 448,599 | 10/6/2023 |
23.9.0 | 291,113 | 9/5/2023 |
23.8.0 | 265,107 | 8/6/2023 |
23.7.0 | 208,231 | 7/9/2023 |
23.6.0 | 284,180 | 6/6/2023 |
23.5.0 | 311,603 | 5/5/2023 |
23.4.0 | 271,244 | 4/4/2023 |
23.3.0 | 646,987 | 3/6/2023 |
23.2.0 | 282,135 | 2/2/2023 |
23.1.0 | 292,278 | 1/6/2023 |
22.12.0 | 489,216 | 12/1/2022 |
22.11.0 | 431,571 | 11/3/2022 |
22.10.0 | 466,128 | 10/6/2022 |
22.9.0 | 410,682 | 9/5/2022 |
22.8.0 | 430,433 | 8/2/2022 |
22.7.0 | 243,248 | 7/4/2022 |
22.6.0 | 280,581 | 6/3/2022 |
22.5.0 | 359,286 | 5/3/2022 |
22.4.0 | 212,374 | 4/1/2022 |
22.3.0 | 447,359 | 2/28/2022 |
22.2.0 | 260,224 | 2/2/2022 |
22.1.0 | 270,349 | 12/29/2021 |
21.12.0 | 258,396 | 12/8/2021 |
21.11.0 | 264,952 | 11/5/2021 |
21.10.0 | 308,505 | 10/7/2021 |
21.9.0 | 281,340 | 9/2/2021 |
21.8.0 | 377,415 | 8/3/2021 |
21.7.0 | 374,407 | 7/2/2021 |
21.6.0 | 314,196 | 6/3/2021 |
21.5.0 | 340,728 | 5/4/2021 |
21.4.0 | 190,418 | 4/1/2021 |
21.3.0 | 296,723 | 3/5/2021 |
21.2.0 | 284,034 | 2/3/2021 |
21.1.0 | 260,776 | 12/29/2020 |
20.12.0 | 394,999 | 12/4/2020 |
20.11.0 | 240,436 | 11/9/2020 |
20.10.0 | 182,776 | 10/6/2020 |
20.9.0 | 281,904 | 9/3/2020 |
20.8.0 | 216,083 | 8/4/2020 |
20.7.0 | 294,250 | 7/3/2020 |
20.6.0 | 342,826 | 6/3/2020 |
20.5.0 | 280,234 | 5/4/2020 |
20.4.0 | 215,372 | 4/3/2020 |
20.3.0 | 268,243 | 3/3/2020 |
20.2.0 | 278,708 | 2/4/2020 |
20.1.0 | 400,428 | 12/30/2019 |
19.12.0 | 199,158 | 12/5/2019 |
19.11.0 | 363,607 | 11/5/2019 |
19.10.0 | 213,305 | 10/4/2019 |
19.9.0 | 383,377 | 9/4/2019 |
19.8.0 | 146,428 | 8/9/2019 |
19.7.0 | 234,373 | 7/3/2019 |
19.6.0 | 176,215 | 6/3/2019 |
19.5.0 | 306,817 | 5/7/2019 |
19.4.0 | 293,689 | 4/2/2019 |
19.3.0 | 134,326 | 3/4/2019 |
19.2.0 | 279,220 | 2/1/2019 |
19.1.0 | 146,372 | 12/26/2018 |
18.12.0 | 297,195 | 12/4/2018 |
18.11.0 | 175,354 | 11/2/2018 |
18.10.0 | 170,126 | 10/3/2018 |
18.9.0 | 168,757 | 9/3/2018 |
18.8.0 | 91,548 | 8/1/2018 |
18.7.0 | 170,492 | 7/4/2018 |
18.6.0 | 276,727 | 6/1/2018 |
18.5.0 | 194,886 | 5/2/2018 |
18.4.0 | 99,129 | 4/2/2018 |
18.3.0 | 75,194 | 3/2/2018 |
18.2.0 | 69,008 | 2/1/2018 |
18.1.0 | 153,228 | 12/26/2017 |
17.12.0 | 131,402 | 12/6/2017 |
17.11.0 | 49,660 | 11/15/2017 |
17.10.0 | 69,151 | 10/9/2017 |
17.9.0 | 45,282 | 9/5/2017 |
17.8.0 | 162,660 | 8/6/2017 |
17.7.0 | 90,931 | 7/6/2017 |
17.6.0 | 47,413 | 6/6/2017 |
17.5.0 | 38,150 | 5/15/2017 |
17.4.0 | 54,259 | 4/4/2017 |
17.3.0 | 75,639 | 3/6/2017 |
17.2.0 | 108,496 | 2/6/2017 |
17.1.0 | 37,572 | 1/16/2017 |
16.12.0 | 74,189 | 12/11/2016 |
16.11.0 | 95,748 | 11/3/2016 |
16.10.0 | 67,126 | 10/12/2016 |
16.8.0 | 98,383 | 9/10/2016 |
16.7.0 | 73,708 | 8/9/2016 |
16.6.0 | 20,664 | 7/13/2016 |
16.5.0 | 41,398 | 6/23/2016 |
16.4.0 | 114,544 | 5/12/2016 |
16.3.0 | 34,677 | 4/11/2016 |
16.2.0 | 42,211 | 3/16/2016 |
16.1.0 | 166,430 | 2/3/2016 |
15.12.0 | 72,815 | 12/26/2015 |
15.11.0 | 26,357 | 12/5/2015 |
15.10.0 | 68,427 | 11/5/2015 |
15.9.0 | 56,295 | 10/12/2015 |
15.8.1 | 61,805 | 9/5/2015 |
15.7.0 | 201,993 | 8/7/2015 |
15.6.0 | 96,360 | 7/4/2015 |
15.5.0 | 28,563 | 6/7/2015 |
15.4.0 | 99,745 | 5/10/2015 |
15.3.0 | 17,971 | 4/2/2015 |
15.2.0 | 63,111 | 3/6/2015 |
15.1.0 | 28,960 | 2/8/2015 |
14.12.0 | 60,042 | 1/10/2015 |
14.11.0 | 41,486 | 12/8/2014 |
14.10.0 | 35,453 | 11/8/2014 |
14.9.0 | 15,240 | 10/17/2014 |
14.8.0 | 33,497 | 9/10/2014 |
14.7.0 | 19,618 | 8/7/2014 |
14.6.0 | 20,948 | 7/7/2014 |
14.5.0 | 78,709 | 6/3/2014 |
14.4.0 | 19,269 | 5/4/2014 |
14.3.0 | 8,952 | 4/7/2014 |
14.2.0 | 25,932 | 3/14/2014 |
14.1.0 | 65,100 | 2/10/2014 |
13.12.0 | 63,651 | 1/12/2014 |
13.11.0 | 34,900 | 12/10/2013 |
13.10.0 | 4,871 | 11/12/2013 |
13.9.0 | 122,775 | 10/9/2013 |
13.8.0 | 28,169 | 9/4/2013 |
13.7.0 | 46,718 | 8/4/2013 |
13.6.0 | 86,928 | 7/3/2013 |
13.5.0 | 11,483 | 6/4/2013 |
13.4.0 | 79,114 | 5/7/2013 |
13.3.0 | 33,841 | 4/3/2013 |
13.2.0 | 16,208 | 3/4/2013 |
13.1.0 | 36,359 | 2/3/2013 |
11.11.0 | 22,665 | 12/31/2012 |
11.10.0 | 46,390 | 12/4/2012 |
11.9.0 | 54,825 | 11/3/2012 |
11.8.0 | 75,967 | 10/7/2012 |
11.7.0 | 15,092 | 9/3/2012 |
11.6.0 | 8,362 | 8/2/2012 |
11.5.0 | 4,683 | 7/3/2012 |
11.4.0 | 24,791 | 6/4/2012 |
11.3.0 | 6,729 | 5/2/2012 |
11.2.0 | 16,536 | 4/10/2012 |
11.1.0 | 5,267 | 3/3/2012 |
11.0.0.1 | 7,192 | 2/16/2012 |
11.0.0 | 5,587 | 2/1/2012 |
10.8.0 | 48,017 | 1/24/2012 |