VDocs is a high-performance, standalone .NET Word document processing framework built for developers who need complete control over Word (DOCX) documents—without using OpenXML SDK or Microsoft Word Interop. It features a fully custom Document Object Model (DOM) capable of mapping bidirectionally to WordprocessingML, and now includes a powerful **DOM → HTML conversion engine**, enabling accurate, CSS-driven rendering of Word documents in modern browsers. This makes VDocs ideal for document rendering, reporting, automation, and export workflows. This package is distributed under a proprietary commercial license and requires a valid license key from VegaRise.
$ dotnet add package VDocsVDocs – High-Performance .NET Word Document Framework
VDocs is a high-performance, standalone .NET Word document processing framework designed for developers who need full control over Word (DOCX) files—without relying on the OpenXML SDK or Microsoft Word Interop.
Built on a fully custom Document Object Model (DOM), VDocs provides deep access to WordprocessingML and supports bidirectional mapping between the DOM and the underlying XML. This enables precise manipulation, high-fidelity rendering, and advanced document transformation scenarios.
VDocs now includes a powerful DOM → HTML conversion engine, delivering accurate, CSS-driven rendering of Word documents directly in modern browsers. This makes it ideal for:
Document preview and rendering and
Reporting and automated document generation
HTML export pipelines
Content transformation workflows
Server-side document processing in cloud applications
Document preview in web applications
VDocs is 3x faster than OpenXML SDK and weighs just 255 KB – a complete, standalone .NET Word document processing framework built from the ground up for maximum performance and minimal footprint.
| Feature | VDocs | OpenXML SDK |
|---|---|---|
| Package Size | ⚡ 255 KB (Ultra-lightweight) | ~4 MB (Heavy) |
| Performance | 🚀 3× Faster document processing | Standard speed |
| Dependencies | ✅ Zero external dependencies | Multiple dependencies |
| Memory Usage | 📉 Minimal memory footprint | High memory consumption |
| Learning Curve | 🎯 Intuitive DOM API | Complex low-level API |
| HTML Export | ✅ Built-in Word → HTML engine | ❌ Requires additional libraries |
| Cross-Platform | ✅ Windows, Linux, macOS | ✅ Windows, Linux, macOS |
| Operation | VDocs | OpenXML SDK | Improvement |
|---|---|---|---|
| Create 100-page document | 0.8s | 2.4s | 300% faster |
| Load and parse document | 0.3s | 1.1s | 367% faster |
| Memory usage (100 pages) | 45 MB | 140 MB | 311% less memory |
| Save to DOCX | 0.5s | 1.7s | 340% faster |
Benchmarks conducted on .NET 8, 16 GB RAM, Intel i7 processor.
VDocs is distributed under a proprietary commercial license and requires a valid license key from VegaRise.
📄 Complete Word Document Support
Create, edit, and save Word (.docx) documents
Paragraphs, runs, text, tables, lists, images, shapes, charts, and more
Headers, footers, page numbering, sections
🧱 Rich Document Object Model (DOM)
High-level abstractions for every major Word element
Clean, intuitive C# API for styling & layout
Custom-built DOM optimized for speed
Lazy loading and intelligent caching
Minimal memory overhead
🔄 Word XML ↔ DOM Mapping
Full bidirectional mapping
Load any DOCX file and manipulate via DOM
No loss of formatting or metadata
Full control over WordprocessingML
Save DOM changes back to DOCX or HTML
🌐 Word → HTML Conversion Engine
Convert Word documents to semantic HTML
Preserves formatting, styles, and layout
Generates clean, maintainable CSS
Perfect for document previews and web publishing
🎨 Advanced Styling & Graphics
Borders, margins, spacing, alignment
Gradients, fills, shapes, outlines
Text effects (Outline, glow, shadow, reflections, 3D effects, gradiant)
🌐 NEW: Word → HTML Export
Convert your DOM to clean semantic XHTML
Auto-generated CSS based on document styles
Page size, margins, fonts, tables, images, shapes — all mapped properly
Browser-friendly output
Image manipulation and positioning
🛠 Enterprise-Ready
Commercial license with support
Regular updates and security patches
Comprehensive documentation
Professional technical support available
dotnet add package VDocs
using VDocs;
// Create document - 3x faster than OpenXML
var doc = new WordDocument();
doc.LicensePath = "VDocsLicense.lic";
// Add content with intuitive API
doc.AddText("Hello, World!")
.Style = new TextStyle
{
Font = new Font
{
Latin = new FontPart { FontName = "Arial", Size = 24, IsBold = true },
Color = Color.Blue
}
};
// Save with optimal performance
doc.Save("HelloWorld.docx");
var doc = WordDocument("report.docx");
// Convert to HTML - perfect for web preview
doc.SaveAsHTML("report.html");
// Create a new Word document instance
var doc = new WordDocument();
doc.LicensePath = "VDocsLicense.lic";
// Add header
var header = doc.AddHeader(HeaderFooterType.Default);
header.AddText("Monthly Report")
.Style = new TextStyle { Font = new Font
{
Latin = new FontPart
{
FontName = "Arial",
Size = 24 ,
IsBold = true,
}
}
};
// Add table with data
var table = new Table(4, 3);
table[0, 0].AddText("Month");
table[0, 1].AddText("Revenue");
table[0, 2].AddText("Growth");
// Fill with data
table[1, 0].AddText("January"); table[1, 1].AddText("$15,000"); table[1, 2].AddText("12%");
table[2, 0].AddText("February"); table[2, 1].AddText("$18,500"); table[2, 2].AddText("23%");
table[3, 0].AddText("March"); table[3, 1].AddText("$22,000"); table[3, 2].AddText("19%");
// Style the table
table.Style = new TableStyle
{
Borders = new TableBorder(BorderValues.single, Color.Gray, 1)
};
doc.AddTable(table);
// Save and convert to HTML
doc.Save("MonthlyReport.docx");
var htmlReport = doc.GetHTML();
// Create a new Word document instance
var doc = new WordDocument();
// Set the license file path required by the VDocs engine
doc.LicensePath = "VDocsLicense.lic";
// Add text directly to the document body.
// This automatically creates a new paragraph.
var text1 = doc.AddText("Add text directly to the document body in a new paragraph.");
// Apply text styling such as font, color, size, and weight
text1.Style = new TextStyle
{
Font = new Font
{
Color = Color.Red,
Latin = new FontPart
{
FontName = "Arial",
Size = 14,
IsBold = true,
}
}
};
// Create a new paragraph explicitly
var paragraph1 = doc.AddParagraph();
// Configure paragraph-level formatting
paragraph1.Style = new ParagraphStyle
{
// Set left and right indentation
Indent = new ParagraphIndentation
{
Left = new DocumentUnit
{
Inch = 1, // Left indent of 1 inch
},
Right = 0.5 // Right indent of 0.5 inches
},
// Control spacing before and after the paragraph
SpacingBetweenLines = new Spacing
{
Before = new DocumentUnit
{
CM = 2, // Space before paragraph (2 cm)
},
After = new DocumentUnit
{
Point = 20 // Space after paragraph (20 points)
},
}
};
// Add text inside the paragraph and apply visual effects
paragraph1
.AddText("Add text to paragraph")
.Style = new TextStyle
{
TextEffect = new TextEffect
{
// Apply a glow effect to the text
GlowEffect = new Glow
{
GlowRadius = 5.0,
GlowColor = new Color
{
A = 128, // Semi-transparent
R = 0,
G = 0,
B = 255 // Blue glow
},
}
}
};
// Save the document to a DOCX file
doc.Save("TextSample.docx");
// Create a new Word document instance
var doc = new WordDocument();
// Set the license file path required by the VDocs engine
doc.LicensePath = "VDocsLicense.lic";
// Create a new paragraph and add a shape to it
var shape = doc.AddParagraph().AddShape(new Shape());
// Define the shape geometry
shape.Type = ShapeType.Triangle;
// Configure the shape transformation (size and position)
shape.Transform = new Transform
{
// Set the shape dimensions
Dimensions = new Dimensions
{
Height = 50.0,
Width = 50.0
},
// Position the shape absolutely on the page
Position = new Position
{
X = 100.0, // Horizontal position (points)
Y = 100.0, // Vertical position (points)
HorizontalIsAbsolute = true,
VerticalIsAbsolute = true,
// Position relative to the page, not margins or paragraph
HorizontalRelativePosition = HorizontalRelativePositionValues.page,
VerticalRelativePosition = VerticalRelativePositionValues.page
}
};
// Apply a solid fill using a theme (scheme) color
shape.Fill = new Fill
{
SolidFill = new Color
{
SchemeColorValue = SchemeColorValues.Accent1,
Shade = 5 // Slightly darker shade of the theme color
}
};
// Configure the shape outline (border)
shape.OutLine = new OutLine
{
SolidFill = new Color("FF0000"), // Red outline (hex color)
CapType = LineCapValues.Flat,
Width = new DocumentUnit
{
Point = 3 // Outline thickness (3 points)
},
CompoundType = CompoundLineValues.Single,
Jointype = StrokeJoinStyleValues.Round
};
// Save the document to a DOCX file
doc.Save("ShapeSample.docx");
// Create a new Word document instance
var doc = new WordDocument();
// Set the license file path required by the VDocs engine
doc.LicensePath = "VDocsLicense.lic";
// Create a table with 3 rows and 2 columns
var table = new Table(3, 2);
// Add header cells
table[0, 0].AddText("Name");
table[0, 1].AddText("Age");
// Add data rows
table[1, 0].AddText("John Smith");
table[1, 1].AddText("55");
// Apply table-level styling
table.Style = new TableStyle
{
// Define table borders (style, color, and thickness)
Borders = new TableBorder(
BorderValues.single,
new Color("acacac"), // Light gray border color
2 // Border width
)
};
// Add the table to the document body
doc.AddTable(table);
// Output the internal document object tree (useful for debugging or inspection)
doc.LogObjectTree();
// Save the document to a DOCX file
doc.Save("TableSample.docx");
// Create a new Word document instance
var doc = new WordDocument();
// Set the license file path required by the VDocs engine
doc.LicensePath = "VDocsLicense.lic";
// -----------------------------------------------------------------------------
// Add an image to the document
// The image is loaded from the specified file path and added as a floating element.
var img1 = doc.AddImage("C:/logo.png");
// -----------------------------------------------------------------------------
// Configure image transformation and layout
// The Transform object controls size, rotation, and positioning of the image.
img1.Transform = new Transform
{
// Define the image size using document units (points in this example)
Dimensions = new Dimensions(150, 150, Units.pt),
// Rotate the image clockwise by 90 degrees
Rotation = 90,
// Set the image position on the page
// X and Y represent offsets relative to the default positioning context
// (typically page or margin, depending on layout rules)
Position = new Position
{
X = 1.1,
Y = 0.5
}
};
// Save the document to a Word (.docx) file
doc.Save("ImageSample.docx");
// Server-side: Convert uploaded Word to HTML
public IActionResult PreviewDocument(IFormFile file)
{
using var stream = new MemoryStream();
file.CopyTo(stream);
var doc = WordDocument.Load(stream);
return Content(doc.ToHtml(), "text/html");
}
// Batch convert Word to HTML
public void ConvertFolderToHtml(string folderPath)
{
foreach (var docxFile in Directory.GetFiles(folderPath, "*.docx"))
{
var doc = WordDocument.Load(docxFile);
var htmlFile = Path.ChangeExtension(docxFile, ".html");
File.WriteAllText(htmlFile, doc.ToHtml());
}
}
📈 Why Developers Love VDocs
✅ "Switched from OpenXML and reduced our document processing time by 70%!"
✅ "The HTML export feature saved us months of development time."
✅ "Incredibly lightweight - our container image went from 500MB to 50MB."
✅ "The API is so much cleaner than OpenXML - our codebase is now maintainable."
📚 Documentation & Support
📖 Full Documentation - Complete API reference and guides
📧 Professional Support - Priority email support for commercial licenses
🏢 Licensing VDocs is available under a commercial license. Free trial available for evaluation.
Get your license: https://vegarise.com/Products/VDocs
Free 30-day trial - Contact sales@vegarise.com for a trial license key or download from this link.