Header Footer Visio Java

Header and footer sections are commonly used to show important information about a document. In some cases, you may need to insert or delete a header or footer in Visio files. This article covers how to insert or remove header and footer in VSD or VSDX files programmatically in Java.

Insert or Delete Header and Footer in Visio Diagrams – Java API Installation

Aspose.Diagram for Java API can be used to work with different features of Visio diagram files. You can easily configure it by downloading its JAR files from the New Releases section, or access it from Aspose Repository using the following details in the pom.xml file of your project:


        <name>Aspose Java API</name>



Insert Header and Footer in VSD or VSDX File Programmatically in Java

You can insert or add a header and footer in a VSD or VSDX Visio file by following the steps below:

  1. Create an instance of the Diagram class to load the source file.
  2. Set different properties exposed by the HeaderFooter class.
  3. Save the output Visio file.

The following code sample shows how to insert the header and footer into a Visio Diagram file in VSD or VSDX format programmatically in Java:

The screenshot below is showing a sample file after inserting the header and footer with the above code snippet:

Header Footer VSD VSDX Java

Delete Header and Footer from VSD VSDX Diagram File in Java

You can delete or remove the header and footer in a VSD or VSDX Diagram file with the following steps:

  1. Initialize an object of the Diagram class to load the input Visio file.
  2. Remove the header and footer then save the output VSD/VSDX Diagram.

The following code snippet shows how to delete the header and footer from a VSD VSDX drawing programmatically in Java:

Get a Free License

You can evaluate the API without any limitations by getting a free temporary license.


In this article, you have learned how to insert or delete header and footer from Visio diagram files in VSD or VSDX format programmatically in Java. However, you can learn many other features of the API by visiting the documentation. Please contact us at the forum in case of any concerns or ambiguity.

See Also

Convert Visio VSD or VSDX File to XAML in Java