Spire.Doc 9.11.6

There is a newer version of this package available.
See the version list below for details.
Install-Package Spire.Doc -Version 9.11.6
dotnet add package Spire.Doc --version 9.11.6
<PackageReference Include="Spire.Doc" Version="9.11.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Spire.Doc --version 9.11.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Spire.Doc, 9.11.6"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Spire.Doc as a Cake Addin
#addin nuget:?package=Spire.Doc&version=9.11.6

// Install Spire.Doc as a Cake Tool
#tool nuget:?package=Spire.Doc&version=9.11.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

.NET Library to Create, Manipulate & Convert Word Documents

Product Page | Documentation | Examples | Forum | Temporary License | Customized Demo

Spire.Doc for .NET is a professional Word API that enables developers to create, read, manipulate, convert and print Word documents in .NET (C#, VB.NET, ASP.NET, .NET Core, .NET Standard and Xamarin) applications without installing Microsoft Office.

By using this multi-functional API, developers are able to perform various Word document processing tasks with ease, like inserting image, hyperlink, digital signature, bookmark, watermark, setting header & footer, creating table, setting background image, adding footnote & endnote and many more.

Standalone .NET API

Spire.Doc for .NET is a totally independent API, it doesn't require Microsoft Office or any other third-party libraries to be installed on system.

Support Both Old and New Word Versions

  • Word 97-2003
  • Word 2007
  • Word 2010
  • Word 2013
  • Word 2016
  • Word 2019

Support a Rich Set of Word Elements

Spire.Doc for .NET supports almost all Word document elements, including pages, sections, headers, footers, footnotes, endnotes, paragraphs, lists, tables, text, fields, hyperlinks, bookmarks, watermarks, math equations, mail merge, comments, images, styles, background settings, digital signature, document printing, document settings, document encryption and decryption. Furthermore, drawing objects including shapes, textboxes, images, OLE objects and content controls are supported as well.

High Quality File Conversions

Using Spire.Doc for .NET, developers can:

  • Convert Word to XML, RTF, TXT, HTML, ODT and vice versa
  • Convert Word to PDF, PDF/A, SVG, PCL, PostScript, XPS and EPUB
  • Convert Word to image (PNG, JPG, TIFF, BMP, EMF)
  • Convert Word to WordXML
  • Convert HTML, HTML string to Word
  • Convert HTML to PDF, image, XML, XPS
  • Convert image to PDF
  • Convert XML to PDF
  • Convert RTF to HTML, PDF

Examples

Create a Word Document in C#

//Create a Document instance
Document doc = new Document();
//Add a section
Section section = doc.AddSection();
//Add a paragraph
Paragraph para = section.AddParagraph();
//Append text to the paragraph
para.AppendText("Hello World");
//Save the result document
doc.SaveToFile(@"C:\Users\Administrator\Desktop\Output.docx", FileFormat.Docx2013);

Convert Word to PDF, HTML and XPS in C#

//Create a Document instance
Document document = new Document();
//Load a sample document
document.LoadFromFile(@"C:\Users\Administrator\Desktop\Template.docx");
           
//Save to PDF
document.SaveToFile("Sample.pdf", FileFormat.PDF);
//Save to HTML
document.SaveToFile("toHTML.html", FileFormat.Html);
//Save to XPS
document.SaveToFile("Sample.xps", FileFormat.XPS);

Convert Word to Image in C#

//Create a Document instance
Document document = new Document();
//Load a sample document
document.LoadFromFile(@"C:\Users\Administrator\Desktop\Template.docx");

//Save to PNG image
for (int i = 0; i < document.PageCount; i++)
{
    Image img = document.SaveToImages(i, Spire.Doc.Documents.ImageType.Metafile);
    String fileName = String.Format("img-{0}.png", i);
    img.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);
}

Product Page | Documentation | Examples | Forum | Temporary License | Customized Demo

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Spire.Doc:

Package Downloads
Zxs.Kernel.Buildin

c6bfc834e20c4d2a7e81ff4ad78f09c2d9a5b10e

ExchangeInteraction

Description

ExperimentSystem

Save Importent Data For Experiment

Victory4Software.Utilities

Package Description

14All

Package Description

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Spire.Doc:

Repository Stars
hanjunjun/Titan.Blog.WebAPP
ASP.NET Core WebAPI前后端分离,后端框架
Version Downloads Last updated
9.12.12 1,109 12/29/2021
9.12.7 868 12/17/2021
9.12.3 594 12/14/2021
9.11.6 4,554 11/12/2021
9.11.5 308 11/11/2021
9.10.9 2,610 10/27/2021
9.10.0 5,830 10/9/2021
9.9.6 3,935 9/17/2021
9.8.6 9,918 8/23/2021
9.7.14 6,338 7/27/2021
9.7.3 6,167 7/7/2021
9.6.10 5,494 6/11/2021
9.6.2 785 6/10/2021
9.4.18 10,171 4/30/2021
9.4.12 4,157 4/19/2021
9.4.1 7,569 4/2/2021
9.3.6 2,874 3/17/2021
9.3.3 656 3/12/2021
9.2.0 29,376 2/3/2021
9.1.0 3,179 1/18/2021
8.12.14 7,077 12/28/2020
8.12.9 3,414 12/18/2020
8.11.15 5,936 11/26/2020
8.11.9 3,643 11/18/2020
8.10.4 10,395 10/22/2020
8.10.0 4,774 10/13/2020
8.9.6 6,354 9/11/2020
8.8.2 6,496 8/17/2020
8.7.5 11,329 7/13/2020
8.6.3 16,634 6/5/2020
8.5.9 4,040 5/28/2020
8.4.10 8,905 4/29/2020
8.4.7 59,192 4/22/2020
8.4.2 2,149 4/15/2020
8.4.0 555 4/14/2020
8.3.15 4,825 3/25/2020
8.3.8 4,927 3/13/2020
8.3.0 1,742 3/3/2020
8.2.9 4,686 2/14/2020
8.2.4 998 2/12/2020
8.1.10 8,809 1/22/2020
8.1.4 1,172 1/16/2020
8.1.0 2,702 1/10/2020
7.12.23 11,547 12/20/2019
7.12.21 658 12/18/2019
7.11.1 14,519 11/6/2019
7.10.0 1,583 10/31/2019
7.9.9 6,227 9/29/2019
7.9.0 8,794 9/6/2019
7.8.12 4,023 8/22/2019
7.8.8 1,067 8/19/2019
7.7.23 4,660 7/31/2019
7.7.0 5,822 7/22/2019
7.6.16 5,079 7/1/2019
7.6.5 6,576 6/12/2019
7.5.9 4,737 5/17/2019
7.5.1 63,465 5/2/2019
7.4.14 975 4/26/2019
7.4.11 1,412 4/19/2019
7.4.6 1,708 4/11/2019
7.3.10 9,969 3/22/2019
7.3.3 10,718 3/8/2019
7.2.4 3,244 2/22/2019
7.1.19 10,599 2/2/2019
7.1.10 2,537 1/22/2019
7.1.0 14,762 1/3/2019
6.12.8 3,423 12/27/2018
6.12.4 1,741 12/14/2018
6.12.1 2,276 12/4/2018
6.11.9 6,991 11/22/2018
6.11.7 1,274 11/15/2018
6.11.5 2,176 11/12/2018
6.11.2 1,006 11/7/2018
6.10.6 1,752 10/26/2018
6.9.13 3,044 9/30/2018
6.9.11 3,892 9/25/2018
6.8.16 17,188 8/31/2018
6.8.11 2,494 8/22/2018
6.8.6 4,961 8/14/2018