Install DocWright
DocWright ships on NuGet. Add the main package to any project that targets .NET Framework 4.8, .NET Standard 2.0, .NET 8 or .NET 10.
Add the package
dotnet add package DocWright
Add capability packages as you need them
Each capability is a separate package, installed the same way:
dotnet add package DocWright.MailMerge # mail merge
dotnet add package DocWright.Composition # build documents in code
dotnet add package DocWright.Compare # compare two documents
dotnet add package DocWright.Signatures # sign and verify
dotnet add package DocWright.Reporting # SSRS reports (with DocWright.Reporting.Rdl)
Choose your packages explains what each one adds.
Check that it works
Create a console app, add the package, and replace Program.cs with this:
using DocWright;
var converter = new DocWrightConverter();
Console.WriteLine("DocWright is ready.");
dotnet new console -n DocWrightHello
cd DocWrightHello
dotnet add package DocWright
dotnet run
Fonts
DocWright measures text with real font files, just as Word does. It uses the fonts installed on the machine and bundles open-licensed fallback faces for any that are missing. A server or container with no fonts still produces reasonable output, and every substitution is reported so you can install the right fonts. Fonts and complex scripts covers custom font folders and fallback chains.
Note
For output that matches Word exactly, install the fonts your documents use (Calibri, Cambria, Times New Roman and so on) on the machine that converts them. On Linux containers, copy the font files into the image or point ConvertOptions.FontDirectories at them.
Next
Your first conversion: turn a Word document into a PDF.