Free Support Forum -

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().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().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

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