HeaderFooterManager Class
Returns the HeaderFooter manager that allows you to add footer text, date, and slide numbers to its associated presentation.
Declaration
public class HeaderFooterManager extends JavaObject
Remarks
Use the HeaderFooterManager class to add footer placeholders to specific slides.
You can create the following placeholders:
- Footer text placeholders
- Date and time placeholders
- Slide number placeholders
The following code snippet creates a presentation and adds footer text, date and time, and a slide number to the first slide.

import com.devexpress.docs.presentation.*;
try (Presentation presentation = new Presentation()) {
// Get the first slide.
Slide slide1 = presentation.getSlides().getFirst();
// Add footer placeholders to the slide.
HeaderFooterManager manager = presentation.getHeaderFooterManager();
manager.addDateTimePlaceholder(slide1);
manager.addFooterPlaceholder(slide1);
manager.addSlideNumberPlaceholder(slide1);
// Get the footer text placeholder.
Shape footerPlaceholder = slide1.getActualFooterPlaceholder();
// Specify footer text.
footerPlaceholder
.getTextArea()
.setText("Created with DevExpress Presentation API");
// Specify date and time text.
slide1.getActualDateTimePlaceholder()
.getTextArea()
.setText(LocalDate.now().format(
DateTimeFormatter.ofPattern(
"EEEE dd MMMM yyyy")));
// Save the presentation.
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("presentation.pptx").toFile())) {
presentation.saveDocument(fileStream);
}
}
Refer to the following help topic for additional information: Customize Slide Footer — Presentation API for Java.
Inherited Members
Inheritance
Methods
addDateTimePlaceholder(NotesSlide note, String text) Method
Adds a date and time placeholder to the specified note slide.
Declaration
public void addDateTimePlaceholder(NotesSlide note, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | The note slide to which the placeholder shape should be added. |
| text | String | The placeholder text. |
addDateTimePlaceholder(NotesSlide note) Method
Adds a date and time placeholder to the specified note slides.
Declaration
public void addDateTimePlaceholder(NotesSlide note)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | Note slides to which the placeholder shape should be added. |
addDateTimePlaceholder(Slide slide, String text) Method
Adds a date and time placeholder to the specified slide.
Declaration
public void addDateTimePlaceholder(Slide slide, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| slide | Slide | The slide to which the placeholder shape should be added. |
| text | String | The placeholder text. |
addDateTimePlaceholder(Slide slide) Method
Adds a date and time placeholder to the specified slide.
Declaration
public void addDateTimePlaceholder(Slide slide)
Parameters
| Name | Type | Description |
|---|---|---|
| slide | Slide | The slide to which the placeholder shape should be added. |
addDateTimePlaceholderNotesSlides(Iterable<NotesSlide> notes, String text) Method
Adds a date and time placeholder to the specified note slides.
Declaration
public void addDateTimePlaceholderNotesSlides(Iterable<NotesSlide> notes, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the placeholder shape should be added. |
| text | String | Note slides to which the placeholder shape should be added. |
addDateTimePlaceholderNotesSlides(Iterable<NotesSlide> notes) Method
Adds a date and time placeholder to the specified note slides.
Declaration
public void addDateTimePlaceholderNotesSlides(Iterable<NotesSlide> notes)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the placeholder shape should be added. |
addDateTimePlaceholderSlides(Iterable<Slide> slides, String text) Method
Adds a date and time placeholder to the specified slides.
Declaration
public void addDateTimePlaceholderSlides(Iterable<Slide> slides, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| slides | java.lang.Iterable<Slide> | Slides to which the placeholder shape should be added. |
| text | String | Slides to which the placeholder shape should be added. |
addDateTimePlaceholderSlides(Iterable<Slide> slides) Method
Adds a date and time placeholder to the specified slides.
Declaration
public void addDateTimePlaceholderSlides(Iterable<Slide> slides)
Parameters
| Name | Type | Description |
|---|---|---|
| slides | java.lang.Iterable<Slide> | Slides to which the placeholder shape should be added. |
addFooterPlaceholder(NotesSlide note, String text) Method
Adds a footer placeholder to the specified note slide.
Declaration
public void addFooterPlaceholder(NotesSlide note, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | The note slide to which the footer placeholder should be added. |
| text | String | The placeholder text. |
addFooterPlaceholder(NotesSlide note) Method
Adds a footer placeholder to the specified slide.
Declaration
public void addFooterPlaceholder(NotesSlide note)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | The slide to which the footer placeholder should be added. |
addFooterPlaceholder(Slide slide, String text) Method
Adds a footer placeholder to the specified slide.
Declaration
public void addFooterPlaceholder(Slide slide, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| slide | Slide | The slide to which the footer placeholder should be added. |
| text | String | The placeholder text. |
addFooterPlaceholder(Slide slide) Method
Adds a footer placeholder to the specified slide.
Declaration
public void addFooterPlaceholder(Slide slide)
Parameters
| Name | Type | Description |
|---|---|---|
| slide | Slide | The slide to which the footer placeholder should be added. |
addFooterPlaceholderNotesSlides(Iterable<NotesSlide> notes, String text) Method
Adds a footer placeholder to the specified note slides.
Declaration
public void addFooterPlaceholderNotesSlides(Iterable<NotesSlide> notes, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the footer placeholder should be added. |
| text | String | Note slides to which the footer placeholder should be added. |
addFooterPlaceholderNotesSlides(Iterable<NotesSlide> notes) Method
Adds a footer placeholder to the specified note slides.
Declaration
public void addFooterPlaceholderNotesSlides(Iterable<NotesSlide> notes)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the footer placeholder should be added. |
addFooterPlaceholderSlides(Iterable<Slide> slides, String text) Method
Adds a footer placeholder to the specified slides.
Declaration
public void addFooterPlaceholderSlides(Iterable<Slide> slides, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| slides | java.lang.Iterable<Slide> | Slides to which the footer placeholder should be added. |
| text | String | Slides to which the footer placeholder should be added. |
addFooterPlaceholderSlides(Iterable<Slide> slides) Method
Adds a footer placeholder to the specified slides.
Declaration
public void addFooterPlaceholderSlides(Iterable<Slide> slides)
Parameters
| Name | Type | Description |
|---|---|---|
| slides | java.lang.Iterable<Slide> | Slides to which the footer placeholder should be added. |
addHeaderPlaceholder(Iterable<NotesSlide> notes, String text) Method
Adds a header placeholder to the specified note slides.
Declaration
public void addHeaderPlaceholder(Iterable<NotesSlide> notes, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the header placeholder should be added. |
| text | String | The placeholder text. |
addHeaderPlaceholder(Iterable<NotesSlide> notes) Method
Adds a header placeholder to the specified note slides.
Declaration
public void addHeaderPlaceholder(Iterable<NotesSlide> notes)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the header placeholder should be added. |
addHeaderPlaceholder(NotesSlide note, String text) Method
Adds a header placeholder to the specified note slide.
Declaration
public void addHeaderPlaceholder(NotesSlide note, String text)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | The note slide to which the header placeholder should be added. |
| text | String | The placeholder text. |
addHeaderPlaceholder(NotesSlide note) Method
Adds a header placeholder to the specified note slides.
Declaration
public void addHeaderPlaceholder(NotesSlide note)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | The note parameter. |
addSlideNumberPlaceholder(NotesSlide note) Method
Adds a slide number placeholder to the specified note slide.
Declaration
public void addSlideNumberPlaceholder(NotesSlide note)
Parameters
| Name | Type | Description |
|---|---|---|
| note | NotesSlide | The note slide to which the slide number placeholder should be added. |
addSlideNumberPlaceholder(Slide slide) Method
Adds a slide number placeholder to the specified slides.
Declaration
public void addSlideNumberPlaceholder(Slide slide)
Parameters
| Name | Type | Description |
|---|---|---|
| slide | Slide | The slide parameter. |
addSlideNumberPlaceholderNotesSlides(Iterable<NotesSlide> notes) Method
Adds a slide number placeholder to the specified note slides.
Declaration
public void addSlideNumberPlaceholderNotesSlides(Iterable<NotesSlide> notes)
Parameters
| Name | Type | Description |
|---|---|---|
| notes | java.lang.Iterable<NotesSlide> | Note slides to which the slide number placeholder should be added. |
addSlideNumberPlaceholderSlides(Iterable<Slide> slides) Method
Adds a slide number placeholder to the specified slides.
Declaration
public void addSlideNumberPlaceholderSlides(Iterable<Slide> slides)
Parameters
| Name | Type | Description |
|---|---|---|
| slides | java.lang.Iterable<Slide> | Slides to which the slide number placeholder should be added. |