.NET library for converting documents. The DocSharp.SystemDrawing package provides helper functions to convert unsupported images when creating documents, using System.Drawing.Common (Windows only) as graphics library.
$ dotnet add package DocSharp.SystemDrawingDocSharp is a pure C# library to convert between document formats without Office interop or native dependencies.
The following packages are currently available:
The optional extra packages DocSharp.ImageSharp and DocSharp.SystemDrawing allow to convert unsupported images (e.g. GIF / TIFF for DOCX -> RTF or WMF / EMF / TIFF for DOCX -> MD).
There is no common DOM to manipulate or generate documents, this library is mainly for conversion. However, the Docx package provides some helper methods on top of the Open XML SDK that may be extended in the future.
If your main purpose is creating documents from scratch you can consider the following libraries: OfficeIMO, OpenXML-Office, ClosedXML, ShapeCrawler, QuestPDF, MigraDoc.
.NET 6, 8, 9 and .NET Framework 4.6.2 and higher are supported, but tests are mostly performed on .NET 8 and above.
You can refer to the project Wiki or sample app.
Dependencies:
Forked:
Others:
DocSharp is licensed under MIT license and can be used for both open source and commercial projects.
DocSharp.ImageSharp is licensed under Apache 2.0 license; ImageSharp and VectSharp have their own licenses, please visit their repositories for more information.
If you find the library useful, adding a star is highly appreciated, stars are a way to guide other developers towards helpful libraries and tools.