GemBox.Document is a .NET component that enables you to read, write, convert, and print document files (DOCX, DOC, PDF, RTF, HTML, and ODT) from .NET applications.
With GemBox.Document you get a fast and reliable component that's easy to use and doesn't depend on Microsoft Word. It requires only .NET and it's much faster than Microsoft Office Automation!
- Read DOC, DOCX, ODT, HTML, MHTML, RTF, TXT, Flat OPC, WordML, and PDF documents.
- Create or write and convert to DOCX, ODT, HTML, MHTML, RTF, TXT, Flat OPC, PDF, XPS, and image formats (SVG, PNG, JPEG, GIF, BMP, TIFF, WMP).
- View and edit documents in Azure Functions, Blazor, ASP.NET Core, ASP.NET, MAUI, WPF, and Windows Forms applications.
- Process documents on Windows, Linux, macOS, Android, and iOS operating systems.
- Print documents.
- Extract individual pages from the documents.
- Protect, restrict, encrypt, and digitally sign documents.
- Get, create, or edit paragraphs, text, tables, table of content, hyperlinks, bookmarks, comments, fields, barcodes, content controls, sections, watermarks, headers and footers, and footnotes and endnotes.
- Get, create, or edit drawings like shapes, pictures, text boxes, and charts.
- Get, create, or edit paragraph, character, list, table, table row, and table cell formatting.
- Get, create, or edit paragraph, list, character, and table styles.
- Access or modify page properties, auto hyphenation, revisions, macros, and more.
- Get and set built-in and custom document properties.
- Clone or import document elements between documents.
- Find, highlight, or replace document content.
- Replace or set bookmark content.
- Load HTML, RTF, or TXT string into specific document position.
- Execute mail merge to import data into a document from various data sources and control the document import region, and import process.
- Create or read form fields.
- Track progress or cancel long-running operations like loading and saving large documents.
- Specify fonts location when exporting to PDF, XPS, or image formats.
- Preserve unsupported document content elements and properties when reading a document.
- Medium trust support.
You are not sure how to start working with Word documents in .NET using GemBox.Document? Check the code below that shows how to create a DOCX file from scratch and write 'Hello World!' on it.
// If using Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
// Create a new empty document.
var document = new DocumentModel();
// Add a section with one paragraph and some text.
document.Sections.Add(
new Section(document,
new Paragraph(document, "Hello World!")));
// Save the document as Word's DOCX file.
document.Save("Output.docx");
For more GemBox.Document code examples and demos, please visit our examples page.
You can download GemBox.Document from NuGet 📦 or from BugFixes 🛠️.