VegaDoc _
Build and manipulate Word documents using our abstracted document model — no Word Interop, no OpenXML SDK, no third-party wrappers.
using Vega.DOM;
using Vega.Enums;
internal class Program
{
private static void Main(string[] args)
{
var doc = new WordDocument();
var image1 = doc.AddParagraph()
.AddImage(new Image("c:/image.jpg"));
image1.Transform.Dimensions = new Dimensions
{
Height = new DocumentUnit { Point = 200 },
Width = new DocumentUnit { Inch = 1 }
};
image1.Transform.Position = new Position
{
X = new DocumentUnit { Inch = 1 },
Y = new DocumentUnit { Inch = 1 },
HorizontalRelativePosition = HorizontalRelativePositionValues.page,
VerticalRelativePosition = VerticalRelativePositionValues.page,
HorizontalIsAbsolute = true,
VerticalIsAbsolute = true
};
image1.Transform.TextWrapping = new TextWrapping
{
WrappingStyle = WrappingStyle.Square,
WrapText = WrapTextValues.left
};
image1.Transform.Rotation = 45;
doc.InsertChildToIndex(0, new Paragraph());
doc.AddTable(new Table(3, 3));
doc.Tables[0].Style = new TableStyle
{
Layout = TableLayoutValues.Autofit,
Borders = new TableBorder
{
Bottom = new BorderStyle
{
BorderColor = new Color("ff0015"),
BorderValue = BorderValues.dashed,
BorderSize = 5
},
Top = new BorderStyle
{
BorderColor = new Color("14fc15"),
BorderValue = BorderValues.cakeSlice,
BorderSize = 5
},
Left = new BorderStyle
{
BorderColor = new Color("14fc15"),
BorderValue = BorderValues.apples,
BorderSize = 5
},
Right = new BorderStyle
{
BorderColor = new Color("14fc15"),
BorderValue = BorderValues.apples,
BorderSize = 3
},
InsideHorizantal = new BorderStyle
{
BorderColor = new Color("14fc15"),
BorderValue = BorderValues.apples,
BorderSize = 2
},
InsideVertical = new BorderStyle
{
BorderColor = new Color("14fc15"),
BorderValue = BorderValues.apples,
BorderSize = 2
},
}
};
doc.Tables[0][0][0].AddParagraph(
new Paragraph())
.AddText("Hello")
.Style = new TextStyle
{
Font = new Font
{
Color = new Color("FF0000"),
Latin = new FontPart
{
FontName = "Times New Roman",
Size = 14,
IsBold = true,
}
}
};
doc.LogObjectTree();
doc.Save("sample1.docx");
}
}
Why VegaDoc?
Most document tools tie you to heavyweight libraries, Word Interop, or rigid SDKs like OpenXML. VegaDoc is different.
We created VegaDoc to serve as a platform-independent, developer-centric document engine. It provides a clean API and high-level abstraction over raw XML to let you:
-
Build and manipulate documents directly
-
Avoid Office dependencies
-
Prepare for multi-format generation
Roadmap Highlights:
-
✅ Full Word support via WordprocessingML
-
🔜 HTML & PDF output layers
-
🔒 Performance-optimized XML processing
⚙️ Features
Pure XML-Driven
VegaDoc uses direct XML parsing and generation, not Office Interop, OpenXML SDK, or any legacy dependencies. It's lean, fast, and built for server-side use.
Format-Agnostic Model
At its core, VegaDoc defines a floating document object model that abstracts away file-specific concerns. Write once, target many.
Fully Object-Oriented
Every structure — paragraphs, shapes, fills, styles — is a strongly-typed class, cleanly mapped to and from WordprocessingML.
Two-Way Mapping
Read from existing Word files or build new ones from scratch — all from your C# code. XML ↔ Model synchronization is seamless and deterministic.
Developer First
Designed with clarity and precision, VegaDoc’s API reduces verbosity and boosts maintainability. Built for developers who need fine-grained document control.
Forward-Compatible
The architecture allows for future format extensions — such as HTML, PDF, and Excel — using the same document core.
Contact Us