Example: TextHeaderFooter

This example sets the height of header and footer of the document.

import com.ibm.symphony.javaapi.Application;
import com.ibm.symphony.javaapi.document.Document;
import com.ibm.symphony.javaapi.document.Documents;
import com.ibm.symphony.javaapi.document.PageStyle;
import com.ibm.symphony.javaapi.document.TextHeaderFooter;

public class TextHeaderFooterExample {

	public void example() {
		Application application = Application.getInstance();
		Documents documents = application.getDocuments();
		Document document = documents.openDocument("D:\\test.odt", true);
		PageStyle pagestyle = document.getPageStyles().getStandard();
		pagestyle.setFooterEnable(true);
		pagestyle.setHeaderEnable(true);
		TextHeaderFooter header = pagestyle.getHeader();
		TextHeaderFooter footer = pagestyle.getFooter();
		header.setAutoHeight(false);
		footer.setAutoHeight(false);
		header.setHeight(800);
		footer.setHeight(800);
	}

}

Related information

TextHeaderFooter