Free Support Forum - aspose.com

Cannot get Header to appear on Empty slide in Aspose.Slides

After adding an empty slide to a new presentation in Java I add the following code to get a header

slide.getHeaderFooter().setHeaderVisible(true);

slide.getHeaderFooter().setHeaderText("Hello Header");

When the code is run no header appears on the slide, when similiar methods are used to create a footer

slide.getHeaderFooter().setFooterVisible(true);

slide.getHeaderFooter().setFooterText("Hello Header");

The footer appears, no problem. Why does it work for footers and not Headers

Dear David,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for considering Aspose.Slides.

Actually, there is no header for slide. But you can add one by adding a textframe on slide or its master slide.

For that you should these see these posts which have code examples, how to achieve it.

Setting Header Footer On Master Slides using Metacharacters

http://www.aspose.com/community/forums/thread/131948/add-text-and-logo-in-slides-power-point.aspx

Adding Title with TextFrame, it also covers Font, Color, Height and Alignment

http://www.aspose.com/community/forums/thread/122846/adding-title-with-textframe.aspx