VegaRise.NET
HomeAPI Reference
Back to DOM

DocumentHeaderClass

Definition

Namespace
DOM.Elements
Assembly
DOM.dll

Concrete implementation of a document header part.

Remarks

inherits common header/footer behavior from and implements . It serves as the concrete container for header content (paragraphs, images, shapes, tables, text, paths) and exposes layout properties such as borders and height constraints via the base class. DocumentHeader DocumentHeaderFooterPart IDocumentHeader Use this class to populate header content for pages or sections. Layout and serialization logic should read properties defined on (for example,, and ) when rendering or exporting the header. DocumentHeaderFooterPart Borders MinHeight MaxHeight FixedHeight

Examples

csharp
1// 1. Add a simple text header
2var doc = new VDocs();
3doc.Header.AddParagraph().AddText("Confidential Report");
4
csharp
1// 2. Add a header to a specific section
2var section = doc.AddSection();
3var header = section.AddHeader(HeaderFooterType.First);
4header.AddParagraph().AddText("Cover Page");
5
csharp
1// 3. Header containing an image and paragraph
2var header = doc.AddHeader(HeaderFooterType.Default);
3header.AddImage("logo.png").SetDimensions(80, 30, Units.pt);
4header.AddParagraph().AddText("Quarterly Report");
5
csharp
1// 4. Header with a table
2var header = doc.AddHeader(HeaderFooterType.Default);
3var t = new Table(1, 2);
4t[0, 0].AddText("Company");
5t[0, 1].AddText("Department");
6header.AddTable(t);
7
No members discovered for this type.