Working with Headers and Footers

Manage Headers and Footers of the Visio Diagrams

Aspose.Diagram for .NET provides a mechanism for setting headers and footers of the Microsoft Office Visio diagrams. Developers can get or set the text string that appears on the left, center and right side of a document header/footer. They can also set header and footer margin along with the font properties of the text.

Setting Headers and Footers Properties

The Diagram class object offers HeaderFooter property which allows to get and set header and footer text, font and margin values. During the print preview of Visio drawing, users can click on “Edit Header & Footer” link button in Microsoft Visio 2013 (in Microsoft Visio 2010 » “Header & Footer” button). There are a few options to add text as shown in the screenshot below. Users can manage these properties programmatically using Aspose.Diagram API as follows:

Programming Sample

The following piece of code helps to manage Headers and Footers properties.