Loic.xceedsoftware.DocX 1.0.0

dotnet add package Loic.xceedsoftware.DocX --version 1.0.0
                    
NuGet\Install-Package Loic.xceedsoftware.DocX -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Loic.xceedsoftware.DocX" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Loic.xceedsoftware.DocX" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Loic.xceedsoftware.DocX" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Loic.xceedsoftware.DocX --version 1.0.0
                    
#r "nuget: Loic.xceedsoftware.DocX, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Loic.xceedsoftware.DocX@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Loic.xceedsoftware.DocX&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Loic.xceedsoftware.DocX&version=1.0.0
                    
Install as a Cake Tool

What is DocX?

DocX is a .NET library that allows developers to manipulate Word 2007/2010/2013 files, in an easy and intuitive manner. DocX is fast, lightweight and best of all it does not require Microsoft Word or Office to be installed.

NOTE: There is a new Master branch as of Oct. 3, 2017. Please read about the Classic branch if you were using this project before the change.

DocX is the free, open source version of Xceed Words for .NET. Originally written by Cathal Coffey, and maintained by Przemyslaw Klys, it is now maintained by Xceed. Starting at v1.5.0, this free and open source product is provided under the Xceed Community License agreement(for non-commercial use).

Currently, the differences between DocX and Xceed Words for .NET, is that Xceed Words for .NET :

  • can convert a Word document to PDF
  • adds properties to wrap text around Pictures/Tables/Shapes
  • adds Picture cropping
  • adds Shapes (rectangles for now)
  • adds TextBoxes or Shapes containing Text
  • gets Shapes from Paragraphs
  • gets Charts from Paragraphs and can modify their categories/values
  • More properties in Charts configuration like axis Label position and series width
  • is at least two versions ahead of the DocX version
  • has professional technical support included in the subscription
  • is available on .NET Standard 2.0 for .NET Core 2.0 Applications
  • can automatically update fields from a document
  • Insert html/rtf text (with tags), or html/rtf document, to a Word document
  • Clone lists or tables
  • Add or modify checkboxes
  • Set transparency in pictures
  • Create formatted hyperlinks based on a referenced hyperlinks
  • Joining 2 documents gives the opportunity to choose the headers/footers of doc1, doc2 or both of them in the resulting document.
  • Automatic hyphenations and configurable hyphenations

What else do I need?

All that you need to install in order to use DocX is the .NET framework 4.0 and Visual Studio 2010 or later, both of which are free.

What are the main features of DocX?

<table>

<tr> <td>Edition</td> <td><b>DocX</b></td> <td><a href="https://xceed.com/xceed-words-for-net"><b>Xceed Words for .NET</b></a></td> </tr> <tr> <td>Price</td> <td>Free</td> <td>$539.95</td> </tr> <tr> <td>License</td> <td>Xceed Community License</td> <td>Proprietary</td> </tr> <tr> <td>Email support</td> <td></td> <td>YES</td> </tr>

<tr> <td>Create new Word documents</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Modify Word documents</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Create new PDF documents</td> <td></td> <td>YES</td> </tr> <tr> <td>Convert Word to PDF</td> <td></td> <td>YES</td> </tr> <tr> <td>Supports .DOCX from Word 2007 and up</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Modify multiple documents in parallel for better performance</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Apply a template to a Word document</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Join documents, recreate portions from one to another</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Supports document protection with or without password</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Set document margins and page size</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Set line spacing, indentation, text direction, text alignment</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Wrap text around pictures</td> <td></td> <td>YES</td> </tr> <tr> <td>Pictures with cropping</td> <td></td> <td>YES</td> </tr> <tr> <td>Manage fonts and font sizes</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Set text color, bold, underline, italic, strikethrough, highlighting</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Set page numbering</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Create sections</td> <td>YES</td> <td>YES</td> </tr> <tr> <td>Update document fields (ex: a table of contents) by calling only one method</td> <td></td> <td>YES</td> </tr> <tr> <td>Wrap text around tables</td> <td></td> <td>YES</td> </tr> <tr> <td>Wrap text around shapes</td> <td></td> <td>YES</td> </tr> <tr> <td>Create shapes (rectangles for now)</td> <td></td> <td>YES</td> </tr> <tr> <td>Create textboxes or shapes containing text</td> <td></td> <td>YES</td> </tr> <tr> <td>Get shapes from paragraphs</td> <td></td> <td>YES</td> </tr> <tr> <td>Get charts from paragraphs and modify their categories/values</td> <td></td> <td>YES</td> </tr> <tr> <td>Update document fields with 1 method call</td> <td></td> <td>YES</td> </tr> <tr> <td>Insert html/rtf text (with tags), or html/rtf document, to a Word document</td> <td></td> <td>YES</td> </tr> <tr> <td>Clone lists or tables</td> <td></td> <td>YES</td> </tr> <tr> <td>Add or modify checkboxes</td> <td></td> <td>YES</td> </tr> <tr> <td>Set transparency in pictures</td> <td></td> <td>YES</td> </tr> <tr> <td>Create formatted hyperlinks based on a referenced hyperlinks</td> <td></td> <td>YES</td> </tr> <tr> <td>Joining 2 documents gives the opportunity to choose which headers/footers to use</td> <td></td> <td>YES</td> </tr> <tr> <td>More properties to configure Charts</td> <td></td> <td>YES</td> </tr> <tr> <tr> <td>Automatic Hyphenations and configurable hyphenations</td> <td></td> <td>YES</td> </tr> <td>Available on .net standard 2.0+ for .net core 2.0+ applications</td> <td></td> <td>YES</td> </tr> <tr> <td>Get release ahead</td> <td></td> <td>YES</td> </tr> </table>

Supported Word document elements

  • Add headers or footers which can be the same on all pages, or unique for the first page, or unique for odd/even pages. Can contain images, hyperlinks and more.
  • Insert/Modify paragraphs.
  • Insert/Modify numbered or bulleted lists.
  • Insert/Modify images. Flip, rotate, copy, modify, resize.
  • Insert/Modify tables. Insert/Remove rows, columns, change direction, column width, row height, borders, merge/delete cells.
  • Insert/Modify formatted equations or formulas.
  • Insert/Modify bookmarks.
  • Insert/Modify hyperlinks.
  • Insert/Modify horizontal lines.
  • Insert/Modify charts (bar, line, pie, 3D chart). Set colors, titles, legend, etc.
  • Find, remove or replace text. Supports case sensitivity and regular expressions.
  • Insert/Modify core or custom properties, such as author, address, subject, title, etc.
  • Insert a Table Of Contents. Set title, change formatting.

Why would I use DocX?

DocX makes creating and manipulating documents a simple task. It does not use COM libraries nor does it require Microsoft Office to be installed.

The following blog post from Cathal Coffey compares the code used to create a HelloWorld document using:

  1. Office Interop libraries,
  2. OOXML SDK,
  3. DocX

Advanced Examples

  1. Step by step guide to create an invoice for a company. http://cathalscorner.blogspot.com/2009/08/docx-v1007-released.html
  2. Replace text across many documents in Parallel. http://cathalscorner.blogspot.com/2010/12/replace-text-across-many-documents-in.html
  3. Programmatically manipulate an Image imbedded inside a document. http://cathalscorner.blogspot.com/2010/12/programmatically-manipulate-image.html
  4. Converting DocX into (.doc, .pdf, .html) http://cathalscorner.blogspot.com/2009/10/converting-docx-into-doc-pdf-html.html

Do you have an interesting or informative example that you would like to share? If you do, please email me.

License Information

DocX is provided under the Xceed Software, Inc. Community License.

<img src="https://user-images.githubusercontent.com/29377763/69274195-d9382200-0ba7-11ea-9ab7-bfce3126f35a.png"/>

More information can be found in the License page.

A commercial license can be purchased at Xceed.

Release history


<a href="https://www.nuget.org/packages/DocX/"> <img alt="NuGet Version" src="https://img.shields.io/nuget/v/DocX.svg" /> </a>

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 7/31/2021